📌  相关文章
📜  driver.find_element_by_xpath - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:03.504000             🧑  作者: Mango

代码示例4
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();
}