Reduced time in ios lib

Signed-off-by: goyalsaurabh06 <saurabh.goyal@candelatech.com>
This commit is contained in:
goyalsaurabh06
2022-01-25 16:26:28 +05:30
parent 50851492a8
commit 0c152e234c

View File

@@ -982,7 +982,7 @@ def get_ip_address_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa
# ---------------------This is to Forget current connected SSID-------------------------------
try:
time.sleep(5)
time.sleep(3)
print("getting in to Additional details")
report.step_start("Clicking More Info")
additional_details_element = driver.find_element_by_xpath("//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']")
@@ -1067,7 +1067,7 @@ def get_ip_address_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa
# ---------------------Click on join-------------------------------
try:
driver.implicitly_wait(4)
driver.implicitly_wait(3)
print("Selecting join")
report.step_start("Clicking JOIN")
joinBTN = driver.find_element_by_xpath("//*[@label='Join']")
@@ -1078,7 +1078,6 @@ def get_ip_address_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa
# ---------------------check if internet-------------------------------
try:
time.sleep(2)
WifiInternetErrMsg2 = WebDriverWait(driver, 5).until(
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='No Internet Connection']")))
# = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text
@@ -1091,17 +1090,16 @@ def get_ip_address_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa
# ---------------------Additional INFO-------------------------------
try:
driver.implicitly_wait(6)
print("Selecting SSID: ", WifiName)
report.step_start("Additional details of SSID")
additional_details_element = WebDriverWait(driver, 30).until(
additional_details_element = WebDriverWait(driver, 35).until(
EC.presence_of_element_located((MobileBy.XPATH,
"//*[@label='" + WifiName + "']")))
# //*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']
additional_details_element.click()
try:
driver.implicitly_wait(6)
driver.implicitly_wait(2)
report.step_start("Checking SSID Name as Expected")
print("Checking SSID Name")
ssidname_text = driver.find_element_by_xpath("//*[@label='" + WifiName + "']").text
@@ -1740,7 +1738,7 @@ def get_ip_address_eap_ios(request, WifiName, User, ttls_passwd, setup_perfectoM
# ---------------------This is to Forget current connected SSID-------------------------------
try:
time.sleep(5)
time.sleep(3)
report.step_start("Selecting Connected SSID Info")
print("getting in to Additional details")
additional_details_element = driver.find_element_by_xpath(
@@ -1814,7 +1812,7 @@ def get_ip_address_eap_ios(request, WifiName, User, ttls_passwd, setup_perfectoM
# Set username
# -------------------------------------------------------
try:
driver.implicitly_wait(4)
driver.implicitly_wait(2)
report.step_start("Entering User")
print("Entering User name")
wifiUserElement = driver.find_element_by_xpath("//*[@label='Username']")
@@ -1837,7 +1835,7 @@ def get_ip_address_eap_ios(request, WifiName, User, ttls_passwd, setup_perfectoM
# ---------------------Click on join-------------------------------
try:
driver.implicitly_wait(4)
driver.implicitly_wait(2)
report.step_start("Clicking Join")
print("Clicking Join")
joinBTN = WebDriverWait(driver, 30).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Join']")))
@@ -1848,7 +1846,7 @@ def get_ip_address_eap_ios(request, WifiName, User, ttls_passwd, setup_perfectoM
# Selecting certificate
# -------------------------------------------------------
try:
driver.implicitly_wait(5)
driver.implicitly_wait(3)
report.step_start("Clicking Trust CA Cert")
print("Clicking Trust CA Cert")
certElement = WebDriverWait(driver, 30).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Trust']")))
@@ -1870,7 +1868,7 @@ def get_ip_address_eap_ios(request, WifiName, User, ttls_passwd, setup_perfectoM
# ---------------------Additional INFO-------------------------------
try:
driver.implicitly_wait(6)
driver.implicitly_wait(4)
print("Selecting SSID: ", WifiName)
report.step_start("Selecting More Info")
additional_details_element = WebDriverWait(driver, 35).until(
@@ -1880,6 +1878,7 @@ def get_ip_address_eap_ios(request, WifiName, User, ttls_passwd, setup_perfectoM
additional_details_element.click()
try:
driver.implicitly_wait(2)
report.step_start("Checking SSID Name as Expected")
print("Checking SSID Name")
ssidname_text = driver.find_element_by_xpath("//*[@label='" + WifiName + "']").text