Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

if driver element exists python

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #driver #element #exists #python
ADD COMMENT
Topic
Name
6+2 =