Wifi 10826 (#694)

* Added Speed test library support in Android

Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>

* Added Speed test library support in ios

Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>

* Changed to speed test app for internet speed test in Android

Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>

* Changed to speed test app for internet speed test in ios

Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>

* Removed the unnecessary comma in speed test arguments

Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>

* Added some wait for GO button in Android for speed test app

Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>

* Added string slicing for Download and upload speed in iOS

Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>

* Changed User and Passwd for EAP testcases from Radius server info

Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>

Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
This commit is contained in:
Haricharan Jaka
2022-09-13 22:18:20 +05:30
committed by GitHub
parent 8b6a3eee0a
commit 0dd9abc431
10 changed files with 114 additions and 82 deletions

View File

@@ -7547,4 +7547,19 @@ def return_upload_download_speed_android(request, setup_perfectoMobile, get_APTo
except NoSuchElementException:
print("Access Point Verification NOT Completed, checking Connection....")
return downloadSpeed, uploadSpeed
def ookla_speed_test_android(request, setup_perfectoMobile, get_APToMobileDevice_data):
driver = setup_perfectoMobile[0]
driver.switch_to.context('NATIVE_APP')
openApp('org.zwanoo.android.speedtest', setup_perfectoMobile)
WebDriverWait(driver, 30).until(
EC.presence_of_element_located((MobileBy.XPATH, "//*[@resource-id='org.zwanoo.android.speedtest:id/go_button']"))).click()
# Wait untill 2 minutes for the test to complete
WebDriverWait(driver, 120).until(
EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Test Again']")))
downloadSpeed = driver.find_element_by_xpath("//*[@text='DOWNLOAD']/parent::*/android.widget.TextView[3]").text
uploadSpeed = driver.find_element_by_xpath("//*[@text='UPLOAD']/parent::*/android.widget.TextView[3]").text
print(f"Download speed: {downloadSpeed}")
print(f"Upload speed: {uploadSpeed}")
return downloadSpeed, uploadSpeed

View File

@@ -3609,5 +3609,22 @@ def return_upload_download_speed_iOS(request, setup_perfectoMobile, get_APToMobi
except NoSuchElementException:
print("Access Point Verification NOT Completed, checking Connection....")
return downloadSpeed, uploadSpeed
def ookla_speed_test_iOS(request, setup_perfectoMobile, get_APToMobileDevice_data):
driver = setup_perfectoMobile[0]
driver.switch_to.context('NATIVE_APP')
openApp( 'com.ookla.speedtest', setup_perfectoMobile)
driver.find_element_by_xpath("//*[@label='GO']").click()
# Wait untill 2 minutes for the test to complete
WebDriverWait(driver, 120).until(
EC.presence_of_element_located((MobileBy.XPATH, "//*[@value='Test Again']")))
result = driver.find_element_by_xpath("//XCUIElementTypeOther[contains(@label,'Download Speed')]").text
print(result)
downloadSpeed = result.split('Download Speed, ')[1].split('. ')[0]
uploadSpeed = result.split('Upload speed, ')[1].split('. ')[0]
downloadSpeed = str(downloadSpeed)[0:4]
uploadSpeed = str(uploadSpeed)[0:4]
print(f"Download speed: {downloadSpeed}")
print(f"Upload speed: {uploadSpeed}")
return downloadSpeed, uploadSpeed