📌  相关文章
📜  如果驱动程序元素存在 python - TypeScript 代码示例

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

代码示例1
from selenium.common.exceptions import NoSuchElementException        
def check_exists_by_xpath(xpath):
    try:
        webdriver.find_element_by_xpath(xpath)
    except NoSuchElementException:
        return False
    return True