mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-01 19:37:54 +00:00
WIFI-9798 (#634)
* Updated cod eblock of wifi_connect in android lib Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added extra sleep to pixel 4 in captive portal for clicking the page Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
This commit is contained in:
@@ -2010,8 +2010,10 @@ def wifi_connect(request, WifiName, WifiPass, setup_perfectoMobile, connData):
|
||||
# This is To get all available ssids
|
||||
# ------------------------------------------------------
|
||||
try:
|
||||
for check_for_all_ssids in range(2):
|
||||
for k in range(9):
|
||||
available_ssids = get_all_available_ssids(driver, deviceModelName)
|
||||
print("active_ssid_list: ", available_ssids)
|
||||
allure.attach(name="Available SSIDs in device: ", body=str(available_ssids))
|
||||
try:
|
||||
if WifiName not in available_ssids:
|
||||
scrollDown(setup_perfectoMobile)
|
||||
@@ -2019,14 +2021,13 @@ def wifi_connect(request, WifiName, WifiPass, setup_perfectoMobile, connData):
|
||||
else:
|
||||
ssid_found = True
|
||||
print(WifiName + " : Found in Device")
|
||||
#allure.attach(name= body=str(WifiName + " : Found in Device"))
|
||||
# allure.attach(name= body=str(WifiName+" : Found in Device"))
|
||||
break
|
||||
except:
|
||||
print("1538")
|
||||
pass
|
||||
print("couldn't find wifi in available ssid")
|
||||
if not ssid_found:
|
||||
print("could not found" + WifiName + " in device")
|
||||
#allure.attach(name= body=str("could not found" + WifiName + " in device"))
|
||||
print("could not found " + WifiName + " in device")
|
||||
# allure.attach(name= body=str("could not found" + WifiName + " in device"))
|
||||
closeApp(connData["appPackage-android"], setup_perfectoMobile)
|
||||
return ssid_with_internet
|
||||
except:
|
||||
@@ -5073,7 +5074,7 @@ def captive_portal_and(request, WifiName, WifiPass, setup_perfectoMobile, connDa
|
||||
except Exception as e:
|
||||
print("Exception on Selecting Wifi Network. Please check wifi Name or signal")
|
||||
try:
|
||||
time.sleep(2)
|
||||
time.sleep(20)
|
||||
report.step_start("Click Accept Terms Button")
|
||||
print("Click Accept Terms Button")
|
||||
join_btn_element = driver.find_element_by_xpath("//*[@text='Accept Terms of Service']")
|
||||
|
||||
Reference in New Issue
Block a user