Answers for "how to avoid no such element exception in selenium python"

2

python exception element not found

from selenium.common.exceptions import NoSuchElementException

try:
    if driver.find_element_by_class_name(test_element_class_name).is_displayed():
        print('found')
except NoSuchElementException:
    pass
Posted by: Guest on March-09-2020

Code answers related to "how to avoid no such element exception in selenium python"

Python Answers by Framework

Browse Popular Code Answers by Language