From 78a1a888fd0c9683a998a1bd8f28afad3c00e0dc Mon Sep 17 00:00:00 2001 From: axl89 Date: Tue, 14 Jun 2016 13:24:17 +0200 Subject: [PATCH] Fixed the is_element_present function by importing NoSuchElementException --- tests/console/include/common_functions_60.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/console/include/common_functions_60.py b/tests/console/include/common_functions_60.py index 4aab3484ee..76623455ea 100644 --- a/tests/console/include/common_functions_60.py +++ b/tests/console/include/common_functions_60.py @@ -60,6 +60,7 @@ def create_user(driver,userid,userpwd,email=None): def is_element_present(driver, how, what): - try: driver.find_element(by=how, value=what) - except NoSuchElementException: return False + from selenium.common.exceptions import NoSuchElementException + try: driver.find_element(by=how, value=what) + except NoSuchElementException: return False return True