📌  相关文章
📜  如果显示 driver.find_element_by_xpath selnium java - Java 代码示例

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

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