“controlador.find_element_by_xpath” Código de respuesta

conducir buscar elemento por xpath

from selenium.webdriver.common.by import By
driver.find_element(By.XPATH, '//*[@id="PasteURL__HomePage"]')
Hamdi Jr

controlador.find_element_by_xpath

driver.find_element_by_xpath('//*[@id="emailField"]')
Artemis

Si se muestra Driver.find_element_by_xpath Selnium Java

if(driver.findElement(By.xpath("/html/body/div[2]/div/div/div/div/div/div/table/tbody/tr[6]/td[2]")).isDisplayed())
{    
    driver.findElement(By.linkText("logout")).getAttribute("href");          
} else {          
    driver.findElement(By.xpath("/html/body/div/div/div/a[2]")).click();
}
Mushy Manx

Elemento seleccionado de selenio por ID

driver.findElement(By.id("ui-datepicker-div"));
Xenophobic Xenomorph

formas de búsqueda de selenio

elementcss= driver.findElement(By.cssSelector('div.nav-search-input'))
Panicky Pintail

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código