1from selenium.common.exceptions import NoSuchElementException
2
3try:
4 if driver.find_element_by_class_name(test_element_class_name).is_displayed():
5 print('found')
6except NoSuchElementException:
7 pass
1try:
2 elem = driver.find_element_by_xpath(".//*[@id='SORM_TB_ACTION0']")
3 elem.click()
4except nosuchelementexception:
5 pass