mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Fixed the is_element_present function by importing NoSuchElementException
This commit is contained in:
parent
7ce8206c87
commit
78a1a888fd
@ -60,6 +60,7 @@ def create_user(driver,userid,userpwd,email=None):
|
|||||||
|
|
||||||
|
|
||||||
def is_element_present(driver, how, what):
|
def is_element_present(driver, how, what):
|
||||||
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
try: driver.find_element(by=how, value=what)
|
try: driver.find_element(by=how, value=what)
|
||||||
except NoSuchElementException: return False
|
except NoSuchElementException: return False
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user