From 49ca226b038e19adc9d4832e341047278c269714 Mon Sep 17 00:00:00 2001 From: Haricharan Jaka <87761091+haricharan-jaka@users.noreply.github.com> Date: Thu, 15 Sep 2022 14:38:18 +0530 Subject: [PATCH] Added wait with driver check of Xpath for trust in EAP scenario (#696) Signed-off-by: haricharan-jaka Signed-off-by: haricharan-jaka --- libs/perfecto_libs/iOS_lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/perfecto_libs/iOS_lib.py b/libs/perfecto_libs/iOS_lib.py index 09e8dc4ea..d86900042 100644 --- a/libs/perfecto_libs/iOS_lib.py +++ b/libs/perfecto_libs/iOS_lib.py @@ -2028,7 +2028,8 @@ def get_ip_address_eap_ios(request, WifiName, User, ttls_passwd, setup_perfectoM driver.implicitly_wait(4) report.step_start("Clicking Trust CA Cert") print("Clicking Trust CA Cert") - certElement = driver.find_element_by_xpath("//*[@label='Trust']") + certElement = WebDriverWait(driver, 45).until( + EC.presence_of_element_located((MobileBy.XPATH,"//*[@label='Trust']"))) certElement.click() except NoSuchElementException: print("Password Page Not Loaded, password May be cached in the System")