mirror of
				https://github.com/Telecominfraproject/wlan-testing.git
				synced 2025-11-04 04:48:01 +00:00 
			
		
		
		
	Updated iOS pytest & lib
Signed-off-by: raj-TIP <rpasupathy@perfectomobile.com>
This commit is contained in:
		@@ -1,21 +1,17 @@
 | 
				
			|||||||
"""
 | 
					"""
 | 
				
			||||||
APNOS Library : Used to execute SSH Commands in AP Using Direct-AP-SSH/ Jumphost-Serial Console
 | 
					APNOS Library : Used to execute SSH Commands in AP Using Direct-AP-SSH/ Jumphost-Serial Console
 | 
				
			||||||
 | 
					 | 
				
			||||||
Currently Having Methods:
 | 
					Currently Having Methods:
 | 
				
			||||||
    1. Get iwinfo
 | 
					    1. Get iwinfo
 | 
				
			||||||
    2. AP Manager Satus
 | 
					    2. AP Manager Satus
 | 
				
			||||||
    3. Vif Config ssid's
 | 
					    3. Vif Config ssid's
 | 
				
			||||||
    4. Vif State ssid's
 | 
					    4. Vif State ssid's
 | 
				
			||||||
    5. Get current Firmware
 | 
					    5. Get current Firmware
 | 
				
			||||||
 | 
					 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					 | 
				
			||||||
import paramiko
 | 
					import paramiko
 | 
				
			||||||
 | 
					from scp import SCPClient
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
class APNOS:
 | 
					class APNOS:
 | 
				
			||||||
 | 
					    def __init__(self, credentials=None, pwd=os.getcwd()):
 | 
				
			||||||
    def __init__(self, credentials=None):
 | 
					 | 
				
			||||||
        self.owrt_args = "--prompt root@OpenAp -s serial --log stdout --user root --passwd openwifi"
 | 
					        self.owrt_args = "--prompt root@OpenAp -s serial --log stdout --user root --passwd openwifi"
 | 
				
			||||||
        if credentials is None:
 | 
					        if credentials is None:
 | 
				
			||||||
            print("No credentials Given")
 | 
					            print("No credentials Given")
 | 
				
			||||||
@@ -27,7 +23,25 @@ class APNOS:
 | 
				
			|||||||
        self.mode = credentials['jumphost']  # 1 for jumphost, 0 for direct ssh
 | 
					        self.mode = credentials['jumphost']  # 1 for jumphost, 0 for direct ssh
 | 
				
			||||||
        if self.mode:
 | 
					        if self.mode:
 | 
				
			||||||
            self.tty = credentials['jumphost_tty']  # /dev/ttyAP1
 | 
					            self.tty = credentials['jumphost_tty']  # /dev/ttyAP1
 | 
				
			||||||
 | 
					            client = self.ssh_cli_connect()
 | 
				
			||||||
 | 
					            cmd = '[ -f ~/cicd-git/ ] && echo "True" || echo "False"'
 | 
				
			||||||
 | 
					            stdin, stdout, stderr = client.exec_command(cmd)
 | 
				
			||||||
 | 
					            if str(stdout.read()).__contains__("False"):
 | 
				
			||||||
 | 
					                cmd = 'mkdir ~/cicd-git/'
 | 
				
			||||||
 | 
					                client.exec_command(cmd)
 | 
				
			||||||
 | 
					            cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"'
 | 
				
			||||||
 | 
					            stdin, stdout, stderr = client.exec_command(cmd)
 | 
				
			||||||
 | 
					            if str(stdout.read()).__contains__("False"):
 | 
				
			||||||
 | 
					                print("Copying openwrt_ctl serial control Script...")
 | 
				
			||||||
 | 
					                with SCPClient(client.get_transport()) as scp:
 | 
				
			||||||
 | 
					                    scp.put(pwd+'openwrt_ctl.py', '~/cicd-git/openwrt_ctl.py')  # Copy my_file.txt to the server
 | 
				
			||||||
 | 
					            cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"'
 | 
				
			||||||
 | 
					            stdin, stdout, stderr = client.exec_command(cmd)
 | 
				
			||||||
 | 
					            var = str(stdout.read())
 | 
				
			||||||
 | 
					            if var.__contains__("True"):
 | 
				
			||||||
 | 
					                print("APNOS Serial Setup OK")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                print("APNOS Serial Setup Fail")
 | 
				
			||||||
    # Method to connect AP-CLI/ JUMPHOST-CLI
 | 
					    # Method to connect AP-CLI/ JUMPHOST-CLI
 | 
				
			||||||
    def ssh_cli_connect(self):
 | 
					    def ssh_cli_connect(self):
 | 
				
			||||||
        client = paramiko.SSHClient()
 | 
					        client = paramiko.SSHClient()
 | 
				
			||||||
@@ -36,45 +50,50 @@ class APNOS:
 | 
				
			|||||||
            self.username, self.ip, self.port, self.password))
 | 
					            self.username, self.ip, self.port, self.password))
 | 
				
			||||||
        client.connect(self.ip, username=self.username, password=self.password,
 | 
					        client.connect(self.ip, username=self.username, password=self.password,
 | 
				
			||||||
                       port=self.port, timeout=10, allow_agent=False, banner_timeout=200)
 | 
					                       port=self.port, timeout=10, allow_agent=False, banner_timeout=200)
 | 
				
			||||||
 | 
					 | 
				
			||||||
        return client
 | 
					        return client
 | 
				
			||||||
 | 
					    def reboot(self):
 | 
				
			||||||
 | 
					        client = self.ssh_cli_connect()
 | 
				
			||||||
 | 
					        cmd = "reboot"
 | 
				
			||||||
 | 
					        if self.mode:
 | 
				
			||||||
 | 
					            cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
 | 
				
			||||||
 | 
					                  f"cmd --value \"{cmd}\" "
 | 
				
			||||||
 | 
					        stdin, stdout, stderr = client.exec_command(cmd)
 | 
				
			||||||
 | 
					        output = stdout.read()
 | 
				
			||||||
 | 
					        client.close()
 | 
				
			||||||
 | 
					        return output
 | 
				
			||||||
    # Method to get the iwinfo status of AP using AP-CLI/ JUMPHOST-CLI
 | 
					    # Method to get the iwinfo status of AP using AP-CLI/ JUMPHOST-CLI
 | 
				
			||||||
    def iwinfo_status(self):
 | 
					    def iwinfo_status(self):
 | 
				
			||||||
        client = self.ssh_cli_connect()
 | 
					        client = self.ssh_cli_connect()
 | 
				
			||||||
        cmd = 'iwinfo'
 | 
					        cmd = 'iwinfo'
 | 
				
			||||||
        if self.mode:
 | 
					        if self.mode:
 | 
				
			||||||
            cmd = f"cd /home/lanforge/lanforge-scripts/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
 | 
					            cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
 | 
				
			||||||
                  f"cmd --value \"{cmd}\" "
 | 
					                  f"cmd --value \"{cmd}\" "
 | 
				
			||||||
        stdin, stdout, stderr = client.exec_command(cmd)
 | 
					        stdin, stdout, stderr = client.exec_command(cmd)
 | 
				
			||||||
        output = stdout.read()
 | 
					        output = stdout.read()
 | 
				
			||||||
        client.close()
 | 
					        client.close()
 | 
				
			||||||
        return output
 | 
					        return output
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Method to get the vif_config of AP using AP-CLI/ JUMPHOST-CLI
 | 
					    # Method to get the vif_config of AP using AP-CLI/ JUMPHOST-CLI
 | 
				
			||||||
    def get_vif_config(self):
 | 
					    def get_vif_config(self):
 | 
				
			||||||
        client = self.ssh_cli_connect()
 | 
					        client = self.ssh_cli_connect()
 | 
				
			||||||
        cmd = "/usr/opensync/bin/ovsh s Wifi_VIF_Config -c"
 | 
					        cmd = "/usr/opensync/bin/ovsh s Wifi_VIF_Config -c"
 | 
				
			||||||
        if self.mode:
 | 
					        if self.mode:
 | 
				
			||||||
            cmd = f"cd /home/lanforge/lanforge-scripts/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
 | 
					            cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
 | 
				
			||||||
                  f"cmd --value \"{cmd}\" "
 | 
					                  f"cmd --value \"{cmd}\" "
 | 
				
			||||||
        stdin, stdout, stderr = client.exec_command(cmd)
 | 
					        stdin, stdout, stderr = client.exec_command(cmd)
 | 
				
			||||||
        output = stdout.read()
 | 
					        output = stdout.read()
 | 
				
			||||||
        client.close()
 | 
					        client.close()
 | 
				
			||||||
        return output
 | 
					        return output
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Method to get the vif_state of AP using AP-CLI/ JUMPHOST-CLI
 | 
					    # Method to get the vif_state of AP using AP-CLI/ JUMPHOST-CLI
 | 
				
			||||||
    def get_vif_state(self):
 | 
					    def get_vif_state(self):
 | 
				
			||||||
        client = self.ssh_cli_connect()
 | 
					        client = self.ssh_cli_connect()
 | 
				
			||||||
        cmd = "/usr/opensync/bin/ovsh s Wifi_VIF_State -c"
 | 
					        cmd = "/usr/opensync/bin/ovsh s Wifi_VIF_State -c"
 | 
				
			||||||
        if self.mode:
 | 
					        if self.mode:
 | 
				
			||||||
            cmd = f"cd /home/lanforge/lanforge-scripts/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
 | 
					            cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
 | 
				
			||||||
                  f"cmd --value \"{cmd}\" "
 | 
					                  f"cmd --value \"{cmd}\" "
 | 
				
			||||||
        stdin, stdout, stderr = client.exec_command(cmd)
 | 
					        stdin, stdout, stderr = client.exec_command(cmd)
 | 
				
			||||||
        output = stdout.read()
 | 
					        output = stdout.read()
 | 
				
			||||||
        client.close()
 | 
					        client.close()
 | 
				
			||||||
        return output
 | 
					        return output
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Method to get the vif_config ssid's of AP using AP-CLI/ JUMPHOST-CLI
 | 
					    # Method to get the vif_config ssid's of AP using AP-CLI/ JUMPHOST-CLI
 | 
				
			||||||
    def get_vif_config_ssids(self):
 | 
					    def get_vif_config_ssids(self):
 | 
				
			||||||
        stdout = self.get_vif_config()
 | 
					        stdout = self.get_vif_config()
 | 
				
			||||||
@@ -84,7 +103,6 @@ class APNOS:
 | 
				
			|||||||
            if ssid[0].split(":")[0] == "b'ssid":
 | 
					            if ssid[0].split(":")[0] == "b'ssid":
 | 
				
			||||||
                ssid_list.append(ssid[0].split(":")[1].replace("'", ""))
 | 
					                ssid_list.append(ssid[0].split(":")[1].replace("'", ""))
 | 
				
			||||||
        return ssid_list
 | 
					        return ssid_list
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Method to get the vif_state ssid's of AP using AP-CLI/ JUMPHOST-CLI
 | 
					    # Method to get the vif_state ssid's of AP using AP-CLI/ JUMPHOST-CLI
 | 
				
			||||||
    def get_vif_state_ssids(self):
 | 
					    def get_vif_state_ssids(self):
 | 
				
			||||||
        stdout = self.get_vif_state()
 | 
					        stdout = self.get_vif_state()
 | 
				
			||||||
@@ -94,14 +112,13 @@ class APNOS:
 | 
				
			|||||||
            if ssid[0].split(":")[0] == "b'ssid":
 | 
					            if ssid[0].split(":")[0] == "b'ssid":
 | 
				
			||||||
                ssid_list.append(ssid[0].split(":")[1].replace("'", ""))
 | 
					                ssid_list.append(ssid[0].split(":")[1].replace("'", ""))
 | 
				
			||||||
        return ssid_list
 | 
					        return ssid_list
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Method to get the active firmware of AP using AP-CLI/ JUMPHOST-CLI
 | 
					    # Method to get the active firmware of AP using AP-CLI/ JUMPHOST-CLI
 | 
				
			||||||
    def get_active_firmware(self):
 | 
					    def get_active_firmware(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            client = self.ssh_cli_connect()
 | 
					            client = self.ssh_cli_connect()
 | 
				
			||||||
            cmd = '/usr/opensync/bin/ovsh s AWLAN_Node -c | grep FW_IMAGE_ACTIVE'
 | 
					            cmd = '/usr/opensync/bin/ovsh s AWLAN_Node -c | grep FW_IMAGE_ACTIVE'
 | 
				
			||||||
            if self.mode:
 | 
					            if self.mode:
 | 
				
			||||||
                cmd = f"cd /home/lanforge/lanforge-scripts/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty}" \
 | 
					                cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty}" \
 | 
				
			||||||
                      f" --action cmd --value \"{cmd}\" "
 | 
					                      f" --action cmd --value \"{cmd}\" "
 | 
				
			||||||
            stdin, stdout, stderr = client.exec_command(cmd)
 | 
					            stdin, stdout, stderr = client.exec_command(cmd)
 | 
				
			||||||
            output = stdout.read()
 | 
					            output = stdout.read()
 | 
				
			||||||
@@ -114,21 +131,20 @@ class APNOS:
 | 
				
			|||||||
            print(e)
 | 
					            print(e)
 | 
				
			||||||
            cli_active_fw = "Error"
 | 
					            cli_active_fw = "Error"
 | 
				
			||||||
        return cli_active_fw
 | 
					        return cli_active_fw
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Method to get the manager state of AP using AP-CLI/ JUMPHOST-CLI
 | 
					    # Method to get the manager state of AP using AP-CLI/ JUMPHOST-CLI
 | 
				
			||||||
    def get_manager_state(self):
 | 
					    def get_manager_state(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            client = self.ssh_cli_connect()
 | 
					            client = self.ssh_cli_connect()
 | 
				
			||||||
            cmd = '/usr/opensync/bin/ovsh s Manager -c | grep status'
 | 
					            cmd = '/usr/opensync/bin/ovsh s Manager -c | grep status'
 | 
				
			||||||
            if self.mode:
 | 
					            if self.mode:
 | 
				
			||||||
                cmd = f"cd /home/lanforge/lanforge-scripts/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty}" \
 | 
					                cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty}" \
 | 
				
			||||||
                      f" --action cmd --value \"{cmd}\" "
 | 
					                      f" --action cmd --value \"{cmd}\" "
 | 
				
			||||||
            stdin, stdout, stderr = client.exec_command(cmd)
 | 
					            stdin, stdout, stderr = client.exec_command(cmd)
 | 
				
			||||||
            output = stdout.read()
 | 
					            output = stdout.read()
 | 
				
			||||||
            status = str(output.decode('utf-8').splitlines())
 | 
					            status = str(output.decode('utf-8').splitlines())
 | 
				
			||||||
 | 
					            # print(output, stderr.read())
 | 
				
			||||||
            client.close()
 | 
					            client.close()
 | 
				
			||||||
        except Exception as e:
 | 
					        except Exception as e:
 | 
				
			||||||
            print(e)
 | 
					            print(e)
 | 
				
			||||||
            status = "Error"
 | 
					            status = "Error"
 | 
				
			||||||
        return status
 | 
					        return status
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										34
									
								
								libs/perfecto_libs/android_lib.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								libs/perfecto_libs/android_lib.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
				
			|||||||
 | 
					# !/usr/local/lib64/python3.8
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					    Controller Library
 | 
				
			||||||
 | 
					        1. controller_data/sdk_base_url
 | 
				
			||||||
 | 
					        2. login credentials
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					from logging import exception
 | 
				
			||||||
 | 
					import unittest
 | 
				
			||||||
 | 
					import warnings
 | 
				
			||||||
 | 
					from perfecto.test import TestResultFactory
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
 | 
					from appium import webdriver
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def openApp(appName, setup_perfectoMobile):
 | 
				
			||||||
 | 
					    print("Refreshing App: " + appName)
 | 
				
			||||||
 | 
					    setup_perfectoMobile[1].step_start("Opening App: " + appName)  
 | 
				
			||||||
 | 
					    params = {'identifier': appName}
 | 
				
			||||||
 | 
					    #Open/Close/Open Action is performed to ensure the app is back to its Original Settings
 | 
				
			||||||
 | 
					    setup_perfectoMobile[0].execute_script('mobile:application:open', params)
 | 
				
			||||||
 | 
					    setup_perfectoMobile[0].execute_script('mobile:application:close', params)
 | 
				
			||||||
 | 
					    setup_perfectoMobile[0].execute_script('mobile:application:open', params)
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					def closeApp(appName, setup_perfectoMobile):
 | 
				
			||||||
 | 
					    print("Closing App.." + appName)
 | 
				
			||||||
 | 
					    setup_perfectoMobile[1].step_start("Closing App: " + appName)  
 | 
				
			||||||
 | 
					    params = {'identifier': appName}
 | 
				
			||||||
 | 
					    setup_perfectoMobile[0].execute_script('mobile:application:close', params)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										395
									
								
								libs/perfecto_libs/iOS_lib.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										395
									
								
								libs/perfecto_libs/iOS_lib.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,395 @@
 | 
				
			|||||||
 | 
					# !/usr/local/lib64/python3.8
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					    Controller Library
 | 
				
			||||||
 | 
					        1. controller_data/sdk_base_url
 | 
				
			||||||
 | 
					        2. login credentials
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					from logging import exception
 | 
				
			||||||
 | 
					import unittest
 | 
				
			||||||
 | 
					import warnings
 | 
				
			||||||
 | 
					from perfecto.test import TestResultFactory
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
 | 
					from appium import webdriver
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def openApp(appName, setup_perfectoMobile):
 | 
				
			||||||
 | 
					    #print("Refreshing App: " + appName)
 | 
				
			||||||
 | 
					    setup_perfectoMobile[1].step_start("Opening App: " + appName)  
 | 
				
			||||||
 | 
					    params = {'identifier': appName}
 | 
				
			||||||
 | 
					    #Open/Close/Open Action is performed to ensure the app is back to its Original Settings
 | 
				
			||||||
 | 
					    setup_perfectoMobile[0].execute_script('mobile:application:open', params)
 | 
				
			||||||
 | 
					    setup_perfectoMobile[0].execute_script('mobile:application:close', params)
 | 
				
			||||||
 | 
					    setup_perfectoMobile[0].execute_script('mobile:application:open', params)
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					def closeApp(appName, setup_perfectoMobile):
 | 
				
			||||||
 | 
					    #print("Closing App.." + appName)
 | 
				
			||||||
 | 
					    setup_perfectoMobile[1].step_start("Closing App: " + appName)  
 | 
				
			||||||
 | 
					    params = {'identifier': appName}
 | 
				
			||||||
 | 
					    setup_perfectoMobile[0].execute_script('mobile:application:close', params)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def set_APconnMobileDevice_iOS(WifiName, setup_perfectoMobile, connData):
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    print("Verifying Wifi/AP Connection Details....") 
 | 
				
			||||||
 | 
					    report = setup_perfectoMobile[1]    
 | 
				
			||||||
 | 
					    driver = setup_perfectoMobile[0]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    report.step_start("Set Wifi Network to " + WifiName)  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #Open Settings Application
 | 
				
			||||||
 | 
					    openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					    # print("Verifying Connected Wifi Connection")
 | 
				
			||||||
 | 
					        report.step_start("Verifying Connected Wifi Connection")  
 | 
				
			||||||
 | 
					        element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']/XCUIElementTypeStaticText[2]")
 | 
				
			||||||
 | 
					        Wifi_AP_Name = element.text
 | 
				
			||||||
 | 
					    except NoSuchElementException:
 | 
				
			||||||
 | 
					        print("Exception: Verify Xpath - UpdateXpath") 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #NEED to fail if Wifi AP NAME isn't in the approved list AKA 5g & 2g.  
 | 
				
			||||||
 | 
					    #print("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name)
 | 
				
			||||||
 | 
					    #print("Wifi Name Matches - Already Connected To: " + WifiName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if Wifi_AP_Name.__eq__(WifiName):
 | 
				
			||||||
 | 
					        print("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name) 
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					        #Verify if Ap is connected with Wifi
 | 
				
			||||||
 | 
					        report.step_start("Verify Wifi Connection Status..")  
 | 
				
			||||||
 | 
					        #print("Click Wifi Connection..")
 | 
				
			||||||
 | 
					        element.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Verifies if AP is connected to Wifi status
 | 
				
			||||||
 | 
					        #print("Verify Wifi Connection Status..")
 | 
				
			||||||
 | 
					        report.step_start("Verify Wifi Connected Status")
 | 
				
			||||||
 | 
					        WifiXpath = "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeStaticText[@label='"+ Wifi_AP_Name + "']"
 | 
				
			||||||
 | 
					        elementWifName = driver.find_element_by_xpath(WifiXpath)
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					        #Check AP Internet Error Msg 
 | 
				
			||||||
 | 
					        print("Checking Internet Connection Error..")
 | 
				
			||||||
 | 
					        report.step_start("Checking Internet Connection Error..")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            WifiInternetErrMsg = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text
 | 
				
			||||||
 | 
					        except NoSuchElementException:
 | 
				
			||||||
 | 
					            report.assertSoft
 | 
				
			||||||
 | 
					            print("Wifi-AP Connected Successfully: " + Wifi_AP_Name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    else:
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            report.step_start("Selecting Wifi...: " + WifiName)
 | 
				
			||||||
 | 
					            element.click()
 | 
				
			||||||
 | 
					        except NoSuchElementException:
 | 
				
			||||||
 | 
					            print("Exception: Selection Wifi Network")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            wifiXpath2 = driver.find_element_by_xpath("//*[@label='"+ WifiName + "']")
 | 
				
			||||||
 | 
					            wifiXpath2.click()
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        except NoSuchElementException:
 | 
				
			||||||
 | 
					            print("\n Can't find Wifi/AP NAME.....CheckXpath & Wifi Name")
 | 
				
			||||||
 | 
					        # print (e.message)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Set password if Needed
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            wifiPassword = driver.find_element_by_xpath("//*[@label='Password']")
 | 
				
			||||||
 | 
					            wifiPassword.send_keys(connData["wifi-SSID-2g-Pwd"])
 | 
				
			||||||
 | 
					        except NoSuchElementException:
 | 
				
			||||||
 | 
					            print("Enter Password Page Not Loaded  ")
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            joinBTN = driver.find_element_by_xpath("//*[@label='Join']")
 | 
				
			||||||
 | 
					            joinBTN.click()
 | 
				
			||||||
 | 
					        except NoSuchElementException:
 | 
				
			||||||
 | 
					            print("Join Button Not Enabled...Verify if Password is set properly  ")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            WifiInternetErrMsg2 = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text
 | 
				
			||||||
 | 
					        except NoSuchElementException:
 | 
				
			||||||
 | 
					            print("Wifi-AP Connected Successfully: " + WifiName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def Toggle_AirplaneMode_iOS(setup_perfectoMobile, connData):
 | 
				
			||||||
 | 
					    report = setup_perfectoMobile[1]    
 | 
				
			||||||
 | 
					    driver = setup_perfectoMobile[0]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #Open Settings Application
 | 
				
			||||||
 | 
					    openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #Toggle Airplane Mode
 | 
				
			||||||
 | 
					    print("Toggle Airplane Mode..")
 | 
				
			||||||
 | 
					    report.step_start("Toggle Airplane Mode")
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					        AirplaneMode = driver.find_element_by_xpath("//XCUIElementTypeSwitch[@label='Airplane Mode']")
 | 
				
			||||||
 | 
					        #Toggle Airplane Mode
 | 
				
			||||||
 | 
					        AirplaneMode.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Verify Cellular Mode Text
 | 
				
			||||||
 | 
					        report.step_start("Verify Cellular Mode")
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            CellularMsgEle = driver.find_element_by_xpath("//*[@name='Airplane Mode' and @value='Airplane Mode']")
 | 
				
			||||||
 | 
					            #ssertEqual(CellularMsgEle.text, "Airplane Mode", "Airplane Mode Not Triggerd")
 | 
				
			||||||
 | 
					            print("Verify Cellular Mode Text: Airplane Mode Success")
 | 
				
			||||||
 | 
					        except NoSuchElementException:
 | 
				
			||||||
 | 
					            print("Cellular Mode Not in Airplane Mode: ERROR") 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Set Airplane Mode Back
 | 
				
			||||||
 | 
					        AirplaneMode.click()         
 | 
				
			||||||
 | 
					    except NoSuchElementException:
 | 
				
			||||||
 | 
					        print("Airplane Wifi Button not loaded...")
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					    #Verify No Sim Card Installed Msg Popup
 | 
				
			||||||
 | 
					    report.step_start("Verify No Sim Card Installed Msg Popup")
 | 
				
			||||||
 | 
					    print("Verify No Sim Card Installed Msg Popup..")
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					        NoSimCardErrorMsg = driver.find_element_by_xpath("//*[@value='No SIM Card Installed']")
 | 
				
			||||||
 | 
					    except NoSuchElementException:
 | 
				
			||||||
 | 
					        print("No Sim Card AlertMsg")
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					    #Click ok on No Sim Card Msg Popup
 | 
				
			||||||
 | 
					    print("Click ok on No Sim Card Msg Popup..")
 | 
				
			||||||
 | 
					    report.step_start("Click ok on No Sim Card Msg Popup")
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					        NoSimCardErrorMsgOK = driver.find_element_by_xpath("//*[@label='OK']")
 | 
				
			||||||
 | 
					        NoSimCardErrorMsgOK.click()
 | 
				
			||||||
 | 
					    except NoSuchElementException:
 | 
				
			||||||
 | 
					        print("No Sim Card AlertMsg")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def verify_APconnMobileDevice_iOS(WifiName, setup_perfectoMobile, connData):
 | 
				
			||||||
 | 
					    report = setup_perfectoMobile[1]    
 | 
				
			||||||
 | 
					    driver = setup_perfectoMobile[0]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    report.step_start("Verifying WifiName: " + WifiName)  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #Refresh Settings Application
 | 
				
			||||||
 | 
					    openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #Verifies if AP is connected to Wifi status
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					       # print("Verifying Connected Wifi Connection")
 | 
				
			||||||
 | 
					        report.step_start("Verifying Connected Wifi Connection")  
 | 
				
			||||||
 | 
					        element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']/XCUIElementTypeStaticText[2]")
 | 
				
			||||||
 | 
					        Wifi_AP_Name = element.text
 | 
				
			||||||
 | 
					       
 | 
				
			||||||
 | 
					    except NoSuchElementException:
 | 
				
			||||||
 | 
					        print("Exception: Verify Xpath - UpdateXpath") 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    try: 
 | 
				
			||||||
 | 
					        if Wifi_AP_Name.__eq__(WifiName):
 | 
				
			||||||
 | 
					            print("Wifi Name Matched Successful ") 
 | 
				
			||||||
 | 
					            #print("Wifi_AP_ConnName: " + "'"+ Wifi_AP_Name + "'" +  "   Not Equal To: " + WifiName + "....Check AP Name Syntax")
 | 
				
			||||||
 | 
					            return True
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print ("-- Wifi Don't Match Match -- ") 
 | 
				
			||||||
 | 
					            #print("Wifi_AP_ConnName: " + "'"+ Wifi_AP_Name + "'" +  "   Not Equal To: " + WifiName + "....Check AP Name Syntax")
 | 
				
			||||||
 | 
					            return False
 | 
				
			||||||
 | 
					    except NoSuchElementException:
 | 
				
			||||||
 | 
					        print("Exception Checking Wifi/AP connection NAME...")    
 | 
				
			||||||
 | 
					        return None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def Toggle_WifiMode_iOS(setup_perfectoMobile, connData):
 | 
				
			||||||
 | 
					    report = setup_perfectoMobile[1]    
 | 
				
			||||||
 | 
					    driver = setup_perfectoMobile[0]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #Open Settings Application
 | 
				
			||||||
 | 
					    #openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    report.step_start("Toggle Wifi Mode")    
 | 
				
			||||||
 | 
					    print("Toggle Wifi Mode..")
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					        WifiMode = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']")
 | 
				
			||||||
 | 
					        #Toggle Wifi Mode
 | 
				
			||||||
 | 
					        WifiMode.click()
 | 
				
			||||||
 | 
					        #Verify Radio Button Mode
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            WifiDissconnected = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']")
 | 
				
			||||||
 | 
					            #self.assertEqual(WifiDissconnected.text, "Airplane Mode", "Airplane Mode Not Triggerd")
 | 
				
			||||||
 | 
					            print("Wifi Radio Button Toggled to Disable")
 | 
				
			||||||
 | 
					        except NoSuchElementException:
 | 
				
			||||||
 | 
					            print("Wifi Radio Button Not Disabled...") 
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        #Set Airplane Mode Back
 | 
				
			||||||
 | 
					        WifiDissconnected.click()     
 | 
				
			||||||
 | 
					        print("Wifi Radio Button Toggled to Enabled")    
 | 
				
			||||||
 | 
					    except NoSuchElementException:
 | 
				
			||||||
 | 
					        print("Airplane Wifi Button not loaded...")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def get_WifiIPAddress_iOS(setup_perfectoMobile, connData):
 | 
				
			||||||
 | 
					    report = setup_perfectoMobile[1]    
 | 
				
			||||||
 | 
					    driver = setup_perfectoMobile[0]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					       # print("Verifying Connected Wifi Connection")
 | 
				
			||||||
 | 
					        report.step_start("Loading Wifi Page")  
 | 
				
			||||||
 | 
					        element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']/XCUIElementTypeStaticText[2]")
 | 
				
			||||||
 | 
					        element.click()
 | 
				
			||||||
 | 
					    except NoSuchElementException:
 | 
				
			||||||
 | 
					        print("Exception: Verify Xpath - unable to click on Wifi") 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    report.step_start("Wifi Page")
 | 
				
			||||||
 | 
					    WifiXpath = "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeStaticText[@label='"+ connData["Default-SSID-perfecto-b"] + "']"
 | 
				
			||||||
 | 
					    elementWifName = driver.find_element_by_xpath(WifiXpath)
 | 
				
			||||||
 | 
					     #Check AP Internet Error Msg 
 | 
				
			||||||
 | 
					    print("Checking Internet Connection Error...")
 | 
				
			||||||
 | 
					    report.step_start("Checking Internet Connection Error..")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					        driver.implicitly_wait(5)
 | 
				
			||||||
 | 
					        WifiInternetErrMsg = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text
 | 
				
			||||||
 | 
					    except NoSuchElementException:
 | 
				
			||||||
 | 
					        #Need to fail test case
 | 
				
			||||||
 | 
					        driver.implicitly_wait(25)
 | 
				
			||||||
 | 
					        print("Wifi Connected without any errors: " + connData["Default-SSID-perfecto-b"])
 | 
				
			||||||
 | 
					        #Fail TEST CASE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    try:   
 | 
				
			||||||
 | 
					        WifiInternetInfo=driver.find_element_by_xpath("(//XCUIElementTypeButton[@label='More Info'])[1]")
 | 
				
			||||||
 | 
					        WifiInternetInfo.click()
 | 
				
			||||||
 | 
					    except NoSuchElementException:
 | 
				
			||||||
 | 
					        print("Wifi-AP Connected Successfully: " + connData["Default-SSID-perfecto-b"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    try:   
 | 
				
			||||||
 | 
					        WifiIPaddress= driver.find_element_by_xpath("(//*[@label='Router']/parent::*/XCUIElementTypeStaticText)[2]").text
 | 
				
			||||||
 | 
					        return WifiIPaddress
 | 
				
			||||||
 | 
					    except NoSuchElementException:
 | 
				
			||||||
 | 
					        print("Wifi-AP Connected Successfully: " + connData["Default-SSID-perfecto-b"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def ping_deftapps_iOS(setup_perfectoMobile, AP_IPaddress):
 | 
				
			||||||
 | 
					    report = setup_perfectoMobile[1]    
 | 
				
			||||||
 | 
					    driver = setup_perfectoMobile[0]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    report.step_start("Pinging deftapps....")
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					        pingHost = "//*[@value='<Hostname or IP address>']"
 | 
				
			||||||
 | 
					        element2 = driver.find_element_by_xpath(pingHost)
 | 
				
			||||||
 | 
					        element2.clear()
 | 
				
			||||||
 | 
					        #element2.send_keys(AP_IPaddress)
 | 
				
			||||||
 | 
					        element2.send_keys("8.8.8.8")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Ping Enable
 | 
				
			||||||
 | 
					        report.step_start("Pingin Host")
 | 
				
			||||||
 | 
					        print("Pingin Host..")
 | 
				
			||||||
 | 
					        element3 = driver.find_element_by_xpath("//*[@label='go']")
 | 
				
			||||||
 | 
					        element3.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        time.sleep(10)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #handle any popup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report.step_start("Stop Ping Host")
 | 
				
			||||||
 | 
					        print("Stop Ping Host..")
 | 
				
			||||||
 | 
					        element4 = driver.find_element_by_xpath("//*[@label='Stop']")
 | 
				
			||||||
 | 
					        element4.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # /* Check Packet Loss */
 | 
				
			||||||
 | 
					        report.step_start("Verifying Packet Loss..")
 | 
				
			||||||
 | 
					        print("Verifying Packet Loss..")
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            element5 = driver.find_element_by_xpath("//XCUIElementTypeStaticText[@label='0']")  
 | 
				
			||||||
 | 
					            #assertEqual(element5.text, "0", "Packet Loss Exist, Please Check Device")
 | 
				
			||||||
 | 
					        except NoSuchElementException:
 | 
				
			||||||
 | 
					            print("No Packet Loss Detected 1st Attempt")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report.step_start("Verifying Packet Sent..")
 | 
				
			||||||
 | 
					        print("Verifying Packet Sent..")
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            packetSent = driver.find_element_by_xpath("//XCUIElementTypeStaticText[@label='Sent']/parent::*/XCUIElementTypeStaticText[2]").text          
 | 
				
			||||||
 | 
					            #assertEqual(element5.text, "0", "Packet Loss Exist, Please Check Device")
 | 
				
			||||||
 | 
					        except NoSuchElementException:
 | 
				
			||||||
 | 
					            print("-------Exception: Packet Sent Error, check object ID")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report.step_start("Verifying Packet Received..")
 | 
				
			||||||
 | 
					        print("Verifying Packet Received..")
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            packetReceived = driver.find_element_by_xpath("//XCUIElementTypeStaticText[@label='Received']/parent::*/XCUIElementTypeStaticText[2]").text          
 | 
				
			||||||
 | 
					            #assertEqual(element5.text, "0", "Packet Loss Exist, Please Check Device")
 | 
				
			||||||
 | 
					        except NoSuchElementException:
 | 
				
			||||||
 | 
					            print("-------Exception: Packet Sent Error, check object ID")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        print("Total Packet Sent: " + packetSent + " Packed Recieved: " + packetReceived)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Also Check #Sendto: No route to host
 | 
				
			||||||
 | 
					        print("Verifying No route to host Error Msg....")
 | 
				
			||||||
 | 
					        report.step_start("Verifying No route to host Error Msg..")
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            element7 = driver.find_element_by_xpath("(//XCUIElementTypeStaticText[@label='Sendto: No route to host'])[2]")  
 | 
				
			||||||
 | 
					            print("Packet Loss Detected on AP!!!!!: " + AP_IPaddress)
 | 
				
			||||||
 | 
					            #self.assertNotEqual(element7.text, "Sendto: No route to host", "Packet Loss Exist, Please Check Device AP: " + Wifi_AP_Name)
 | 
				
			||||||
 | 
					        except NoSuchElementException:
 | 
				
			||||||
 | 
					            print("\nNo Packet Loss Detected on AP!!!!!: " + AP_IPaddress)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    except NoSuchElementException:
 | 
				
			||||||
 | 
					        print("Exception while ping Deft App on iOS")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def tearDown(setup_perfectoMobile):
 | 
				
			||||||
 | 
					    report = setup_perfectoMobile[1]    
 | 
				
			||||||
 | 
					    driver = setup_perfectoMobile[0]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    report.step_start("Exception Failure Tear Down....")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					        print(" -- Tear Down --")     
 | 
				
			||||||
 | 
					        report.test_stop(TestResultFactory.create_failure)
 | 
				
			||||||
 | 
					        print('Report-Url: ' + report.report_url() + '\n')
 | 
				
			||||||
 | 
					        driver.close()
 | 
				
			||||||
 | 
					    except Exception as e:
 | 
				
			||||||
 | 
					        print(" -- Exception Not Able To close --")    
 | 
				
			||||||
 | 
					        print (e.message)
 | 
				
			||||||
 | 
					    finally:
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            driver.quit()
 | 
				
			||||||
 | 
					        except Exception as e:
 | 
				
			||||||
 | 
					            print(" -- Exception Not Able To Quit --")    
 | 
				
			||||||
 | 
					            print (e.message)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def verifyUploadDownloadSpeediOS(setup_perfectoMobile, get_APToMobileDevice_data):
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile[1]    
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try:  
 | 
				
			||||||
 | 
					            report.step_start("Google Home Page")     
 | 
				
			||||||
 | 
					            driver.get(connData["webURL"]) 
 | 
				
			||||||
 | 
					            elementFindTxt = driver.find_element_by_xpath(connData["lblSearch"])
 | 
				
			||||||
 | 
					            elementFindTxt.send_keys("Internet Speed Test")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            try:
 | 
				
			||||||
 | 
					                elelSearch = driver.find_element_by_xpath(connData["elelSearch"])  
 | 
				
			||||||
 | 
					                elelSearch.click()
 | 
				
			||||||
 | 
					            except NoSuchElementException:
 | 
				
			||||||
 | 
					                print("Enter Not Active...")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            report.step_start("Verify Run Button")           
 | 
				
			||||||
 | 
					            driver.find_element_by_xpath(connData["BtnRunSpeedTest"]).click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            #Get upload/Download Speed
 | 
				
			||||||
 | 
					            try:
 | 
				
			||||||
 | 
					                report.step_start("Get upload/Download Speed")   
 | 
				
			||||||
 | 
					                time.sleep(60)
 | 
				
			||||||
 | 
					                downloadMbps = driver.find_element_by_xpath(connData["downloadMbps"])
 | 
				
			||||||
 | 
					                downloadSpeed = downloadMbps.text
 | 
				
			||||||
 | 
					                print("Download: " + downloadSpeed + " Mbps")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                UploadMbps = driver.find_element_by_xpath(connData["UploadMbps"])
 | 
				
			||||||
 | 
					                uploadSpeed = UploadMbps.text
 | 
				
			||||||
 | 
					                print("Upload: " + uploadSpeed + " Mbps")
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
 | 
					                print("Access Point Verification Completed Successfully")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            except NoSuchElementException:
 | 
				
			||||||
 | 
					                print("Access Point Verification NOT Completed, checking Connection....")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            currentResult = True    
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            assert currentResult
 | 
				
			||||||
 | 
					        except Exception as e:
 | 
				
			||||||
 | 
					            print (e.message)
 | 
				
			||||||
@@ -77,6 +77,34 @@ def pytest_addoption(parser):
 | 
				
			|||||||
        help="Stop using Testrails"
 | 
					        help="Stop using Testrails"
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #Perfecto Parameters
 | 
				
			||||||
 | 
					    parser.addini("perfectoURL", "Cloud URL")
 | 
				
			||||||
 | 
					    parser.addini("securityToken", "Security Token")
 | 
				
			||||||
 | 
					    parser.addini("platformName-iOS", "iOS Platform")
 | 
				
			||||||
 | 
					    parser.addini("platformName-android", "Android Platform")
 | 
				
			||||||
 | 
					    parser.addini("model-iOS", "iOS Devices")
 | 
				
			||||||
 | 
					    parser.addini("model-android", "Android Devices")
 | 
				
			||||||
 | 
					    parser.addini("bundleId-iOS", "iOS Devices")
 | 
				
			||||||
 | 
					    parser.addini("bundleId-iOS-Settings", "iOS Settings App")
 | 
				
			||||||
 | 
					    parser.addini("appPackage-android", "Android Devices")
 | 
				
			||||||
 | 
					    parser.addini("wifi-SSID-5gl-Pwd", "Wifi 5g Password")
 | 
				
			||||||
 | 
					    parser.addini("wifi-SSID-2g-Pwd", "Wifi 2g Password")
 | 
				
			||||||
 | 
					    parser.addini("Default-SSID-5gl-perfecto-b", "Wifi 5g AP Name")
 | 
				
			||||||
 | 
					    parser.addini("Default-SSID-2g-perfecto-b", "Wifi 2g AP Name")
 | 
				
			||||||
 | 
					    parser.addini("Default-SSID-perfecto-b", "Wifi AP Name")
 | 
				
			||||||
 | 
					    parser.addini("bundleId-iOS-Ping", "Ping Bundle ID")
 | 
				
			||||||
 | 
					    parser.addini("browserType-iOS", "Mobile Browser Name")    
 | 
				
			||||||
 | 
					    parser.addini("projectName", "Project Name")
 | 
				
			||||||
 | 
					    parser.addini("projectVersion", "Project Version")
 | 
				
			||||||
 | 
					    parser.addini("jobName", "CI Job Name")
 | 
				
			||||||
 | 
					    parser.addini("jobNumber", "CI Job Number")
 | 
				
			||||||
 | 
					    parser.addini("reportTags", "Report Tags")
 | 
				
			||||||
 | 
					    parser.addoption(
 | 
				
			||||||
 | 
					        "--access-points-perfecto",
 | 
				
			||||||
 | 
					        # nargs="+",
 | 
				
			||||||
 | 
					        default=["Perfecto"],
 | 
				
			||||||
 | 
					        help="list of access points to test"
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
Test session base fixture
 | 
					Test session base fixture
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										15
									
								
								tests/e2e/interOp/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								tests/e2e/interOp/README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					# wlan-testing framework Information
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## pytest  uses setup > test > tear_down
 | 
				
			||||||
 | 
					#### Fixtures : Code that needs to be part of more than 1 test cases, Setup and teardown is Implemented in Fixtures
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#pip3 install selenium
 | 
				
			||||||
 | 
					#pip3 install perfecto-py37
 | 
				
			||||||
 | 
					#pip3 install Appium-Python-Client   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### For any Clarifications, regarding Framework, 
 | 
				
			||||||
 | 
					#### Email : shivam.thakur@candelatech.com
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -10,37 +10,41 @@ from perfecto import (PerfectoExecutionContext, PerfectoReportiumClient,TestCont
 | 
				
			|||||||
import pytest
 | 
					import pytest
 | 
				
			||||||
import logging
 | 
					import logging
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sys.path.append(
 | 
				
			||||||
 | 
					    os.path.dirname(
 | 
				
			||||||
 | 
					        os.path.realpath(__file__)
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					if "libs" not in sys.path:
 | 
				
			||||||
 | 
					    sys.path.append(f'../libs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from apnos.apnos import APNOS
 | 
				
			||||||
 | 
					from controller.controller import Controller
 | 
				
			||||||
 | 
					from controller.controller import ProfileUtility
 | 
				
			||||||
 | 
					from controller.controller import FirmwareUtility
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import logging
 | 
				
			||||||
 | 
					from configuration import RADIUS_SERVER_DATA
 | 
				
			||||||
 | 
					from configuration import TEST_CASES
 | 
				
			||||||
 | 
					from configuration import CONFIGURATION
 | 
				
			||||||
 | 
					from configuration import FIRMWARE
 | 
				
			||||||
 | 
					from testrails.testrail_api import APIClient
 | 
				
			||||||
 | 
					from testrails.reporting import Reporting
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sys.path.append(
 | 
				
			||||||
 | 
					    os.path.dirname(
 | 
				
			||||||
 | 
					        os.path.realpath(__file__)
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					if "tests" not in sys.path:
 | 
				
			||||||
 | 
					    sys.path.append(f'../tests')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from configuration import CONFIGURATION
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from urllib3 import exceptions
 | 
					from urllib3 import exceptions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def pytest_addoption(parser):
 | 
					 | 
				
			||||||
    parser.addini("perfectoURL", "Cloud URL")
 | 
					 | 
				
			||||||
    parser.addini("securityToken", "Security Token")
 | 
					 | 
				
			||||||
    parser.addini("platformName-iOS", "iOS Platform")
 | 
					 | 
				
			||||||
    parser.addini("platformName-android", "Android Platform")
 | 
					 | 
				
			||||||
    parser.addini("model-iOS", "iOS Devices")
 | 
					 | 
				
			||||||
    parser.addini("model-android", "Android Devices")
 | 
					 | 
				
			||||||
    parser.addini("bundleId-iOS", "iOS Devices")
 | 
					 | 
				
			||||||
    parser.addini("bundleId-iOS-Settings", "iOS Settings App")
 | 
					 | 
				
			||||||
    parser.addini("appPackage-android", "Android Devices")
 | 
					 | 
				
			||||||
    parser.addini("wifi-SSID-5gl-Pwd", "Wifi 5g Password")
 | 
					 | 
				
			||||||
    parser.addini("wifi-SSID-2g-Pwd", "Wifi 2g Password")
 | 
					 | 
				
			||||||
    parser.addini("Default-SSID-5gl-perfecto-b", "Wifi 5g AP Name")
 | 
					 | 
				
			||||||
    parser.addini("Default-SSID-2g-perfecto-b", "Wifi 2g AP Name")
 | 
					 | 
				
			||||||
    parser.addini("Default-SSID-perfecto-b", "Wifi AP Name")
 | 
					 | 
				
			||||||
    parser.addini("bundleId-iOS-Ping", "Ping Bundle ID")
 | 
					 | 
				
			||||||
    parser.addini("browserType-iOS", "Mobile Browser Name")    
 | 
					 | 
				
			||||||
    parser.addini("projectName", "Project Name")
 | 
					 | 
				
			||||||
    parser.addini("projectVersion", "Project Version")
 | 
					 | 
				
			||||||
    parser.addini("jobName", "CI Job Name")
 | 
					 | 
				
			||||||
    parser.addini("jobNumber", "CI Job Number")
 | 
					 | 
				
			||||||
    parser.addini("reportTags", "Report Tags")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    parser.addoption(
 | 
					 | 
				
			||||||
        "--access-points",
 | 
					 | 
				
			||||||
        # nargs="+",
 | 
					 | 
				
			||||||
        default=["Perfecto"],
 | 
					 | 
				
			||||||
        help="list of access points to test"
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@pytest.fixture(scope="class")
 | 
					@pytest.fixture(scope="class")
 | 
				
			||||||
def setup_perfectoMobileWeb(request):
 | 
					def setup_perfectoMobileWeb(request):
 | 
				
			||||||
@@ -200,336 +204,257 @@ def get_ToggleWifiMode_data(request):
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    yield passPoint_data
 | 
					    yield passPoint_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def openApp(appName, setup_perfectoMobile):
 | 
					 | 
				
			||||||
    #print("Refreshing App: " + appName)
 | 
					 | 
				
			||||||
    setup_perfectoMobile[1].step_start("Opening App: " + appName)  
 | 
					 | 
				
			||||||
    params = {'identifier': appName}
 | 
					 | 
				
			||||||
    #Open/Close/Open Action is performed to ensure the app is back to its Original Settings
 | 
					 | 
				
			||||||
    setup_perfectoMobile[0].execute_script('mobile:application:open', params)
 | 
					 | 
				
			||||||
    setup_perfectoMobile[0].execute_script('mobile:application:close', params)
 | 
					 | 
				
			||||||
    setup_perfectoMobile[0].execute_script('mobile:application:open', params)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
def closeApp(appName, setup_perfectoMobile):
 | 
					 | 
				
			||||||
    #print("Closing App.." + appName)
 | 
					 | 
				
			||||||
    setup_perfectoMobile[1].step_start("Closing App: " + appName)  
 | 
					 | 
				
			||||||
    params = {'identifier': appName}
 | 
					 | 
				
			||||||
    setup_perfectoMobile[0].execute_script('mobile:application:close', params)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
def set_APconnMobileDevice_iOS(WifiName, setup_perfectoMobile, connData):
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    print("Verifying Wifi/AP Connection Details....") 
 | 
					@pytest.fixture(scope="function")
 | 
				
			||||||
    report = setup_perfectoMobile[1]    
 | 
					def get_lanforge_data(testbed):
 | 
				
			||||||
    driver = setup_perfectoMobile[0]
 | 
					    lanforge_data = {}
 | 
				
			||||||
 | 
					    if CONFIGURATION[testbed]['traffic_generator']['name'] == 'lanforge':
 | 
				
			||||||
 | 
					        lanforge_data = {
 | 
				
			||||||
 | 
					            "lanforge_ip": CONFIGURATION[testbed]['traffic_generator']['details']['ip'],
 | 
				
			||||||
 | 
					            "lanforge-port-number": CONFIGURATION[testbed]['traffic_generator']['details']['port'],
 | 
				
			||||||
 | 
					            "lanforge_2dot4g": CONFIGURATION[testbed]['traffic_generator']['details']['2.4G-Radio'][0],
 | 
				
			||||||
 | 
					            "lanforge_5g": CONFIGURATION[testbed]['traffic_generator']['details']['5G-Radio'][0],
 | 
				
			||||||
 | 
					            "lanforge_2dot4g_prefix": CONFIGURATION[testbed]['traffic_generator']['details']['2.4G-Station-Name'],
 | 
				
			||||||
 | 
					            "lanforge_5g_prefix": CONFIGURATION[testbed]['traffic_generator']['details']['5G-Station-Name'],
 | 
				
			||||||
 | 
					            "lanforge_2dot4g_station": CONFIGURATION[testbed]['traffic_generator']['details']['2.4G-Station-Name'],
 | 
				
			||||||
 | 
					            "lanforge_5g_station": CONFIGURATION[testbed]['traffic_generator']['details']['5G-Station-Name'],
 | 
				
			||||||
 | 
					            "lanforge_bridge_port": CONFIGURATION[testbed]['traffic_generator']['details']['upstream'],
 | 
				
			||||||
 | 
					            "lanforge_vlan_port": CONFIGURATION[testbed]['traffic_generator']['details']['upstream'] + ".100",
 | 
				
			||||||
 | 
					            "vlan": 100
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    yield lanforge_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    report.step_start("Set Wifi Network to " + WifiName)  
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #Open Settings Application
 | 
					@pytest.fixture(scope="module")
 | 
				
			||||||
    openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
 | 
					def instantiate_profile(instantiate_controller):
 | 
				
			||||||
 | 
					    #try:
 | 
				
			||||||
 | 
					    profile_object = ProfileUtility(sdk_client=instantiate_controller)
 | 
				
			||||||
 | 
					    #except:
 | 
				
			||||||
 | 
					    #profile_object = False
 | 
				
			||||||
 | 
					    yield profile_object
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    try:
 | 
					 | 
				
			||||||
    # print("Verifying Connected Wifi Connection")
 | 
					 | 
				
			||||||
        report.step_start("Verifying Connected Wifi Connection")  
 | 
					 | 
				
			||||||
        element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']/XCUIElementTypeStaticText[2]")
 | 
					 | 
				
			||||||
        Wifi_AP_Name = element.text
 | 
					 | 
				
			||||||
    except NoSuchElementException:
 | 
					 | 
				
			||||||
        print("Exception: Verify Xpath - UpdateXpath") 
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #NEED to fail if Wifi AP NAME isn't in the approved list AKA 5g & 2g.  
 | 
					@pytest.fixture(scope="session")
 | 
				
			||||||
    #print("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name)
 | 
					def get_equipment_id(instantiate_controller, testbed):
 | 
				
			||||||
    #print("Wifi Name Matches - Already Connected To: " + WifiName)
 | 
					    equipment_id = 0
 | 
				
			||||||
 | 
					    if len(CONFIGURATION[testbed]['access_point']) == 1:
 | 
				
			||||||
 | 
					        equipment_id = instantiate_controller.get_equipment_id(
 | 
				
			||||||
 | 
					            serial_number=CONFIGURATION[testbed]['access_point'][0]['serial'])
 | 
				
			||||||
 | 
					    yield equipment_id
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if Wifi_AP_Name.__eq__(WifiName):
 | 
					 | 
				
			||||||
        print("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name) 
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #Verify if Ap is connected with Wifi
 | 
					@pytest.fixture(scope="session")
 | 
				
			||||||
        report.step_start("Verify Wifi Connection Status..")  
 | 
					def upload_firmware(should_upload_firmware, instantiate_firmware, get_latest_firmware):
 | 
				
			||||||
        #print("Click Wifi Connection..")
 | 
					    firmware_id = instantiate_firmware.upload_fw_on_cloud(fw_version=get_latest_firmware,
 | 
				
			||||||
        element.click()
 | 
					                                                          force_upload=should_upload_firmware)
 | 
				
			||||||
 | 
					    yield firmware_id
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #Verifies if AP is connected to Wifi status
 | 
					 | 
				
			||||||
        #print("Verify Wifi Connection Status..")
 | 
					 | 
				
			||||||
        report.step_start("Verify Wifi Connected Status")
 | 
					 | 
				
			||||||
        WifiXpath = "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeStaticText[@label='"+ Wifi_AP_Name + "']"
 | 
					 | 
				
			||||||
        elementWifName = driver.find_element_by_xpath(WifiXpath)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #Check AP Internet Error Msg 
 | 
					@pytest.fixture(scope="session")
 | 
				
			||||||
        print("Checking Internet Connection Error..")
 | 
					def upgrade_firmware(request, instantiate_firmware, get_equipment_id, check_ap_firmware_cloud, get_latest_firmware,
 | 
				
			||||||
        report.step_start("Checking Internet Connection Error..")
 | 
					                     should_upgrade_firmware):
 | 
				
			||||||
 | 
					    if get_latest_firmware != check_ap_firmware_cloud:
 | 
				
			||||||
        try:
 | 
					        if request.config.getoption("--skip-upgrade"):
 | 
				
			||||||
            WifiInternetErrMsg = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text
 | 
					            status = "skip-upgrade"
 | 
				
			||||||
        except NoSuchElementException:
 | 
					 | 
				
			||||||
            report.assertSoft
 | 
					 | 
				
			||||||
            print("Wifi-AP Connected Successfully: " + Wifi_AP_Name)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    else:
 | 
					 | 
				
			||||||
        try:
 | 
					 | 
				
			||||||
            report.step_start("Selecting Wifi...: " + WifiName)
 | 
					 | 
				
			||||||
            element.click()
 | 
					 | 
				
			||||||
        except NoSuchElementException:
 | 
					 | 
				
			||||||
            print("Exception: Selection Wifi Network")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        try:
 | 
					 | 
				
			||||||
            wifiXpath2 = driver.find_element_by_xpath("//*[@label='"+ WifiName + "']")
 | 
					 | 
				
			||||||
            wifiXpath2.click()
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        except NoSuchElementException:
 | 
					 | 
				
			||||||
            print("\n Can't find Wifi/AP NAME.....CheckXpath & Wifi Name")
 | 
					 | 
				
			||||||
        # print (e.message)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        #Set password if Needed
 | 
					 | 
				
			||||||
        try:
 | 
					 | 
				
			||||||
            wifiPassword = driver.find_element_by_xpath("//*[@label='Password']")
 | 
					 | 
				
			||||||
            wifiPassword.send_keys(connData["wifi-SSID-2g-Pwd"])
 | 
					 | 
				
			||||||
        except NoSuchElementException:
 | 
					 | 
				
			||||||
            print("Enter Password Page Not Loaded  ")
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        try:
 | 
					 | 
				
			||||||
            joinBTN = driver.find_element_by_xpath("//*[@label='Join']")
 | 
					 | 
				
			||||||
            joinBTN.click()
 | 
					 | 
				
			||||||
        except NoSuchElementException:
 | 
					 | 
				
			||||||
            print("Join Button Not Enabled...Verify if Password is set properly  ")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        try:
 | 
					 | 
				
			||||||
            WifiInternetErrMsg2 = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text
 | 
					 | 
				
			||||||
        except NoSuchElementException:
 | 
					 | 
				
			||||||
            print("Wifi-AP Connected Successfully: " + WifiName)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def Toggle_AirplaneMode_iOS(setup_perfectoMobile, connData):
 | 
					 | 
				
			||||||
    report = setup_perfectoMobile[1]    
 | 
					 | 
				
			||||||
    driver = setup_perfectoMobile[0]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    #Open Settings Application
 | 
					 | 
				
			||||||
    openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    #Toggle Airplane Mode
 | 
					 | 
				
			||||||
    print("Toggle Airplane Mode..")
 | 
					 | 
				
			||||||
    report.step_start("Toggle Airplane Mode")
 | 
					 | 
				
			||||||
    try:
 | 
					 | 
				
			||||||
        AirplaneMode = driver.find_element_by_xpath("//XCUIElementTypeSwitch[@label='Airplane Mode']")
 | 
					 | 
				
			||||||
        #Toggle Airplane Mode
 | 
					 | 
				
			||||||
        AirplaneMode.click()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        #Verify Cellular Mode Text
 | 
					 | 
				
			||||||
        report.step_start("Verify Cellular Mode")
 | 
					 | 
				
			||||||
        try:
 | 
					 | 
				
			||||||
            CellularMsgEle = driver.find_element_by_xpath("//*[@name='Airplane Mode' and @value='Airplane Mode']")
 | 
					 | 
				
			||||||
            #ssertEqual(CellularMsgEle.text, "Airplane Mode", "Airplane Mode Not Triggerd")
 | 
					 | 
				
			||||||
            print("Verify Cellular Mode Text: Airplane Mode Success")
 | 
					 | 
				
			||||||
        except NoSuchElementException:
 | 
					 | 
				
			||||||
            print("Cellular Mode Not in Airplane Mode: ERROR") 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        #Set Airplane Mode Back
 | 
					 | 
				
			||||||
        AirplaneMode.click()         
 | 
					 | 
				
			||||||
    except NoSuchElementException:
 | 
					 | 
				
			||||||
        print("Airplane Wifi Button not loaded...")
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
    #Verify No Sim Card Installed Msg Popup
 | 
					 | 
				
			||||||
    report.step_start("Verify No Sim Card Installed Msg Popup")
 | 
					 | 
				
			||||||
    print("Verify No Sim Card Installed Msg Popup..")
 | 
					 | 
				
			||||||
    try:
 | 
					 | 
				
			||||||
        NoSimCardErrorMsg = driver.find_element_by_xpath("//*[@value='No SIM Card Installed']")
 | 
					 | 
				
			||||||
    except NoSuchElementException:
 | 
					 | 
				
			||||||
        print("No Sim Card AlertMsg")
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
    #Click ok on No Sim Card Msg Popup
 | 
					 | 
				
			||||||
    print("Click ok on No Sim Card Msg Popup..")
 | 
					 | 
				
			||||||
    report.step_start("Click ok on No Sim Card Msg Popup")
 | 
					 | 
				
			||||||
    try:
 | 
					 | 
				
			||||||
        NoSimCardErrorMsgOK = driver.find_element_by_xpath("//*[@label='OK']")
 | 
					 | 
				
			||||||
        NoSimCardErrorMsgOK.click()
 | 
					 | 
				
			||||||
    except NoSuchElementException:
 | 
					 | 
				
			||||||
        print("No Sim Card AlertMsg")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def verify_APconnMobileDevice_iOS(WifiName, setup_perfectoMobile, connData):
 | 
					 | 
				
			||||||
    report = setup_perfectoMobile[1]    
 | 
					 | 
				
			||||||
    driver = setup_perfectoMobile[0]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    report.step_start("Verifying WifiName: " + WifiName)  
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    #Refresh Settings Application
 | 
					 | 
				
			||||||
    openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    #Verifies if AP is connected to Wifi status
 | 
					 | 
				
			||||||
    try:
 | 
					 | 
				
			||||||
       # print("Verifying Connected Wifi Connection")
 | 
					 | 
				
			||||||
        report.step_start("Verifying Connected Wifi Connection")  
 | 
					 | 
				
			||||||
        element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']/XCUIElementTypeStaticText[2]")
 | 
					 | 
				
			||||||
        Wifi_AP_Name = element.text
 | 
					 | 
				
			||||||
       
 | 
					 | 
				
			||||||
    except NoSuchElementException:
 | 
					 | 
				
			||||||
        print("Exception: Verify Xpath - UpdateXpath") 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    try: 
 | 
					 | 
				
			||||||
        if Wifi_AP_Name.__eq__(WifiName):
 | 
					 | 
				
			||||||
            print("Wifi Name Matched Successful ") 
 | 
					 | 
				
			||||||
            #print("Wifi_AP_ConnName: " + "'"+ Wifi_AP_Name + "'" +  "   Not Equal To: " + WifiName + "....Check AP Name Syntax")
 | 
					 | 
				
			||||||
            return True
 | 
					 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            print ("-- Wifi Don't Match Match -- ") 
 | 
					            status = instantiate_firmware.upgrade_fw(equipment_id=get_equipment_id, force_upload=False,
 | 
				
			||||||
            #print("Wifi_AP_ConnName: " + "'"+ Wifi_AP_Name + "'" +  "   Not Equal To: " + WifiName + "....Check AP Name Syntax")
 | 
					                                                     force_upgrade=should_upgrade_firmware)
 | 
				
			||||||
            return False
 | 
					    else:
 | 
				
			||||||
    except NoSuchElementException:
 | 
					        if should_upgrade_firmware:
 | 
				
			||||||
        print("Exception Checking Wifi/AP connection NAME...")    
 | 
					            status = instantiate_firmware.upgrade_fw(equipment_id=get_equipment_id, force_upload=False,
 | 
				
			||||||
        return None
 | 
					                                                     force_upgrade=should_upgrade_firmware)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            status = "skip-upgrade"
 | 
				
			||||||
 | 
					    yield status
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def Toggle_WifiMode_iOS(setup_perfectoMobile, connData):
 | 
					 | 
				
			||||||
    report = setup_perfectoMobile[1]    
 | 
					 | 
				
			||||||
    driver = setup_perfectoMobile[0]
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #Open Settings Application
 | 
					@pytest.fixture(scope="session")
 | 
				
			||||||
    #openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
 | 
					def check_ap_firmware_cloud(instantiate_controller, get_equipment_id):
 | 
				
			||||||
 | 
					    yield instantiate_controller.get_ap_firmware_old_method(equipment_id=get_equipment_id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    report.step_start("Toggle Wifi Mode")    
 | 
					
 | 
				
			||||||
    print("Toggle Wifi Mode..")
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Profiles Related Fixtures
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@pytest.fixture(scope="module")
 | 
				
			||||||
 | 
					def get_current_profile_cloud(instantiate_profile):
 | 
				
			||||||
 | 
					    ssid_names = []
 | 
				
			||||||
 | 
					    for i in instantiate_profile.profile_creation_ids["ssid"]:
 | 
				
			||||||
 | 
					        ssid_names.append(instantiate_profile.get_ssid_name_by_profile_id(profile_id=i))
 | 
				
			||||||
 | 
					    yield ssid_names
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@pytest.fixture(scope="module")
 | 
				
			||||||
 | 
					def setup_profiles(request, create_profiles, instantiate_profile, get_equipment_id, get_current_profile_cloud, testbed):
 | 
				
			||||||
 | 
					    test_cases = {}
 | 
				
			||||||
 | 
					    mode = str(request.param[0]).lower()
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        WifiMode = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']")
 | 
					        instantiate_profile.push_profile_old_method(equipment_id=get_equipment_id)
 | 
				
			||||||
        #Toggle Wifi Mode
 | 
					    except:
 | 
				
			||||||
        WifiMode.click()
 | 
					        print("failed to create AP Profile")
 | 
				
			||||||
        #Verify Radio Button Mode
 | 
					    ap_ssh = APNOS(CONFIGURATION[testbed]['access_point'][0])
 | 
				
			||||||
        try:
 | 
					    get_current_profile_cloud.sort()
 | 
				
			||||||
            WifiDissconnected = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']")
 | 
					    # This loop will check the VIF Config with cloud profile
 | 
				
			||||||
            #self.assertEqual(WifiDissconnected.text, "Airplane Mode", "Airplane Mode Not Triggerd")
 | 
					    for i in range(0, 18):
 | 
				
			||||||
            print("Wifi Radio Button Toggled to Disable")
 | 
					        vif_config = list(ap_ssh.get_vif_config_ssids())
 | 
				
			||||||
        except NoSuchElementException:
 | 
					        vif_config.sort()
 | 
				
			||||||
            print("Wifi Radio Button Not Disabled...") 
 | 
					        print(vif_config)
 | 
				
			||||||
        
 | 
					        print(get_current_profile_cloud)
 | 
				
			||||||
        #Set Airplane Mode Back
 | 
					        if get_current_profile_cloud == vif_config:
 | 
				
			||||||
        WifiDissconnected.click()     
 | 
					            test_cases[mode + '_vifc'] = True
 | 
				
			||||||
        print("Wifi Radio Button Toggled to Enabled")    
 | 
					            break
 | 
				
			||||||
    except NoSuchElementException:
 | 
					 | 
				
			||||||
        print("Airplane Wifi Button not loaded...")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def get_WifiIPAddress_iOS(setup_perfectoMobile, connData):
 | 
					 | 
				
			||||||
    report = setup_perfectoMobile[1]    
 | 
					 | 
				
			||||||
    driver = setup_perfectoMobile[0]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    try:
 | 
					 | 
				
			||||||
       # print("Verifying Connected Wifi Connection")
 | 
					 | 
				
			||||||
        report.step_start("Loading Wifi Page")  
 | 
					 | 
				
			||||||
        element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']/XCUIElementTypeStaticText[2]")
 | 
					 | 
				
			||||||
        element.click()
 | 
					 | 
				
			||||||
    except NoSuchElementException:
 | 
					 | 
				
			||||||
        print("Exception: Verify Xpath - unable to click on Wifi") 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    report.step_start("Wifi Page")
 | 
					 | 
				
			||||||
    WifiXpath = "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeStaticText[@label='"+ connData["Default-SSID-perfecto-b"] + "']"
 | 
					 | 
				
			||||||
    elementWifName = driver.find_element_by_xpath(WifiXpath)
 | 
					 | 
				
			||||||
     #Check AP Internet Error Msg 
 | 
					 | 
				
			||||||
    print("Checking Internet Connection Error...")
 | 
					 | 
				
			||||||
    report.step_start("Checking Internet Connection Error..")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    try:
 | 
					 | 
				
			||||||
        driver.implicitly_wait(5)
 | 
					 | 
				
			||||||
        WifiInternetErrMsg = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text
 | 
					 | 
				
			||||||
    except NoSuchElementException:
 | 
					 | 
				
			||||||
        #Need to fail test case
 | 
					 | 
				
			||||||
        driver.implicitly_wait(25)
 | 
					 | 
				
			||||||
        print("Wifi Connected without any errors: " + connData["Default-SSID-perfecto-b"])
 | 
					 | 
				
			||||||
        #Fail TEST CASE
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    try:   
 | 
					 | 
				
			||||||
        WifiInternetInfo=driver.find_element_by_xpath("(//XCUIElementTypeButton[@label='More Info'])[1]")
 | 
					 | 
				
			||||||
        WifiInternetInfo.click()
 | 
					 | 
				
			||||||
    except NoSuchElementException:
 | 
					 | 
				
			||||||
        print("Wifi-AP Connected Successfully: " + connData["Default-SSID-perfecto-b"])
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    try:   
 | 
					 | 
				
			||||||
        WifiIPaddress= driver.find_element_by_xpath("(//*[@label='Router']/parent::*/XCUIElementTypeStaticText)[2]").text
 | 
					 | 
				
			||||||
        return WifiIPaddress
 | 
					 | 
				
			||||||
    except NoSuchElementException:
 | 
					 | 
				
			||||||
        print("Wifi-AP Connected Successfully: " + connData["Default-SSID-perfecto-b"])
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return None
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def ping_deftapps_iOS(setup_perfectoMobile, AP_IPaddress):
 | 
					 | 
				
			||||||
    report = setup_perfectoMobile[1]    
 | 
					 | 
				
			||||||
    driver = setup_perfectoMobile[0]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    report.step_start("Pinging deftapps....")
 | 
					 | 
				
			||||||
    try:
 | 
					 | 
				
			||||||
        pingHost = "//*[@value='<Hostname or IP address>']"
 | 
					 | 
				
			||||||
        element2 = driver.find_element_by_xpath(pingHost)
 | 
					 | 
				
			||||||
        element2.clear()
 | 
					 | 
				
			||||||
        #element2.send_keys(AP_IPaddress)
 | 
					 | 
				
			||||||
        element2.send_keys("8.8.8.8")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        #Ping Enable
 | 
					 | 
				
			||||||
        report.step_start("Pingin Host")
 | 
					 | 
				
			||||||
        print("Pingin Host..")
 | 
					 | 
				
			||||||
        element3 = driver.find_element_by_xpath("//*[@label='go']")
 | 
					 | 
				
			||||||
        element3.click()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        time.sleep(10)
 | 
					        time.sleep(10)
 | 
				
			||||||
 | 
					    ap_ssh = APNOS(CONFIGURATION[testbed]['access_point'][0])
 | 
				
			||||||
 | 
					    # This loop will check the VIF Config with VIF State
 | 
				
			||||||
 | 
					    for i in range(0, 18):
 | 
				
			||||||
 | 
					        vif_state = list(ap_ssh.get_vif_state_ssids())
 | 
				
			||||||
 | 
					        vif_state.sort()
 | 
				
			||||||
 | 
					        vif_config = list(ap_ssh.get_vif_config_ssids())
 | 
				
			||||||
 | 
					        vif_config.sort()
 | 
				
			||||||
 | 
					        print(vif_config)
 | 
				
			||||||
 | 
					        print(vif_state)
 | 
				
			||||||
 | 
					        if vif_state == vif_config:
 | 
				
			||||||
 | 
					            test_cases[mode + '_vifs'] = True
 | 
				
			||||||
 | 
					            break
 | 
				
			||||||
 | 
					        time.sleep(10)
 | 
				
			||||||
 | 
					    yield test_cases
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #handle any popup
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        report.step_start("Stop Ping Host")
 | 
					@pytest.fixture(scope="module")
 | 
				
			||||||
        print("Stop Ping Host..")
 | 
					def create_profiles(request, get_security_flags, get_markers, instantiate_profile, setup_profile_data):
 | 
				
			||||||
        element4 = driver.find_element_by_xpath("//*[@label='Stop']")
 | 
					    profile_id = {"ssid": [], "rf": None, "radius": None, "equipment_ap": None}
 | 
				
			||||||
        element4.click()
 | 
					    mode = str(request.param[0])
 | 
				
			||||||
 | 
					    test_cases = {}
 | 
				
			||||||
 | 
					    if mode not in ["BRIDGE", "NAT", "VLAN"]:
 | 
				
			||||||
 | 
					        print("Invalid Mode: ", mode)
 | 
				
			||||||
 | 
					        yield False
 | 
				
			||||||
 | 
					    instantiate_profile.delete_profile_by_name(profile_name="Equipment-AP-" + mode)
 | 
				
			||||||
 | 
					    for i in setup_profile_data[mode]:
 | 
				
			||||||
 | 
					        for j in setup_profile_data[mode][i]:
 | 
				
			||||||
 | 
					            instantiate_profile.delete_profile_by_name(
 | 
				
			||||||
 | 
					                profile_name=setup_profile_data[mode][i][j]['profile_name'])
 | 
				
			||||||
 | 
					    instantiate_profile.delete_profile_by_name(profile_name="Automation-Radius-Profile-" + mode)
 | 
				
			||||||
 | 
					    instantiate_profile.get_default_profiles()
 | 
				
			||||||
 | 
					    # if get_markers["wifi5"]:
 | 
				
			||||||
 | 
					    #     # Create RF Profile
 | 
				
			||||||
 | 
					    #     pass
 | 
				
			||||||
 | 
					    # if get_markers["wifi6"]:
 | 
				
			||||||
 | 
					    #     # Create RF Profile
 | 
				
			||||||
 | 
					    #     pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # /* Check Packet Loss */
 | 
					    # Create RF Profile Here
 | 
				
			||||||
        report.step_start("Verifying Packet Loss..")
 | 
					    instantiate_profile.set_rf_profile()
 | 
				
			||||||
        print("Verifying Packet Loss..")
 | 
					    if get_markers["radius"]:
 | 
				
			||||||
 | 
					        radius_info = RADIUS_SERVER_DATA
 | 
				
			||||||
 | 
					        radius_info["name"] = "Automation-Radius-Profile-" + mode
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            element5 = driver.find_element_by_xpath("//XCUIElementTypeStaticText[@label='0']")  
 | 
					            instantiate_profile.create_radius_profile(radius_info=radius_info)
 | 
				
			||||||
            #assertEqual(element5.text, "0", "Packet Loss Exist, Please Check Device")
 | 
					            test_cases['radius_profile'] = True
 | 
				
			||||||
        except NoSuchElementException:
 | 
					        except:
 | 
				
			||||||
            print("No Packet Loss Detected 1st Attempt")
 | 
					            test_cases['radius_profile'] = False
 | 
				
			||||||
 | 
					    for i in get_security_flags:
 | 
				
			||||||
        report.step_start("Verifying Packet Sent..")
 | 
					        if get_markers[i] and i == "open":
 | 
				
			||||||
        print("Verifying Packet Sent..")
 | 
					            if get_markers["twog"]:
 | 
				
			||||||
        try:
 | 
					                profile_data = setup_profile_data[mode]["OPEN"]["2G"]
 | 
				
			||||||
            packetSent = driver.find_element_by_xpath("//XCUIElementTypeStaticText[@label='Sent']/parent::*/XCUIElementTypeStaticText[2]").text          
 | 
					                try:
 | 
				
			||||||
            #assertEqual(element5.text, "0", "Packet Loss Exist, Please Check Device")
 | 
					                    id = instantiate_profile.create_open_ssid_profile(two4g=True, fiveg=False,
 | 
				
			||||||
        except NoSuchElementException:
 | 
					                                                                      profile_data=profile_data)
 | 
				
			||||||
            print("-------Exception: Packet Sent Error, check object ID")
 | 
					                    profile_id["ssid"].append(profile_data['ssid_name'])
 | 
				
			||||||
 | 
					                    test_cases['ssid_2g_open_' + mode.lower()] = True
 | 
				
			||||||
        report.step_start("Verifying Packet Received..")
 | 
					                except:
 | 
				
			||||||
        print("Verifying Packet Received..")
 | 
					                    test_cases['ssid_2g_open_' + mode.lower()] = False
 | 
				
			||||||
        try:
 | 
					            if get_markers["fiveg"]:
 | 
				
			||||||
            packetReceived = driver.find_element_by_xpath("//XCUIElementTypeStaticText[@label='Received']/parent::*/XCUIElementTypeStaticText[2]").text          
 | 
					                profile_data = setup_profile_data[mode]["OPEN"]["5G"]
 | 
				
			||||||
            #assertEqual(element5.text, "0", "Packet Loss Exist, Please Check Device")
 | 
					                try:
 | 
				
			||||||
        except NoSuchElementException:
 | 
					                    id = instantiate_profile.create_open_ssid_profile(two4g=False, fiveg=True,
 | 
				
			||||||
            print("-------Exception: Packet Sent Error, check object ID")
 | 
					                                                                      profile_data=profile_data)
 | 
				
			||||||
 | 
					                    profile_id["ssid"].append(profile_data['ssid_name'])
 | 
				
			||||||
        print("Total Packet Sent: " + packetSent + " Packed Recieved: " + packetReceived)
 | 
					                    test_cases['ssid_5g_open_' + mode.lower()] = True
 | 
				
			||||||
 | 
					                except:
 | 
				
			||||||
        # Also Check #Sendto: No route to host
 | 
					                    test_cases['ssid_5g_open_' + mode.lower()] = False
 | 
				
			||||||
        print("Verifying No route to host Error Msg....")
 | 
					        if get_markers[i] and i == "wpa":
 | 
				
			||||||
        report.step_start("Verifying No route to host Error Msg..")
 | 
					            if get_markers["twog"]:
 | 
				
			||||||
        try:
 | 
					                profile_data = setup_profile_data[mode]["WPA"]["2G"]
 | 
				
			||||||
            element7 = driver.find_element_by_xpath("(//XCUIElementTypeStaticText[@label='Sendto: No route to host'])[2]")  
 | 
					                try:
 | 
				
			||||||
            print("Packet Loss Detected on AP!!!!!: " + AP_IPaddress)
 | 
					                    id = instantiate_profile.create_wpa_ssid_profile(two4g=True, fiveg=False, profile_data=profile_data)
 | 
				
			||||||
            #self.assertNotEqual(element7.text, "Sendto: No route to host", "Packet Loss Exist, Please Check Device AP: " + Wifi_AP_Name)
 | 
					                    profile_id["ssid"].append(profile_data['ssid_name'])
 | 
				
			||||||
        except NoSuchElementException:
 | 
					                    test_cases['ssid_2g_wpa_' + mode.lower()] = True
 | 
				
			||||||
            print("\nNo Packet Loss Detected on AP!!!!!: " + AP_IPaddress)
 | 
					                except:
 | 
				
			||||||
 | 
					                    test_cases['ssid_5g_wpa_' + mode.lower()] = False
 | 
				
			||||||
    except NoSuchElementException:
 | 
					            if get_markers["fiveg"]:
 | 
				
			||||||
        print("Exception while ping Deft App on iOS")
 | 
					                profile_data = setup_profile_data[mode]["WPA"]["5G"]
 | 
				
			||||||
 | 
					                try:
 | 
				
			||||||
    return None
 | 
					                    id = instantiate_profile.create_wpa_ssid_profile(two4g=False, fiveg=True, profile_data=profile_data)
 | 
				
			||||||
 | 
					                    profile_id["ssid"].append(profile_data['ssid_name'])
 | 
				
			||||||
def tearDown(setup_perfectoMobile):
 | 
					                    test_cases['ssid_5g_wpa_' + mode.lower()] = True
 | 
				
			||||||
    report = setup_perfectoMobile[1]    
 | 
					                except:
 | 
				
			||||||
    driver = setup_perfectoMobile[0]
 | 
					                    test_cases['ssid_5g_wpa_' + mode.lower()] = False
 | 
				
			||||||
 | 
					        if get_markers[i] and i == "wpa2_personal":
 | 
				
			||||||
    report.step_start("Exception Failure Tear Down....")
 | 
					            if get_markers["twog"]:
 | 
				
			||||||
 | 
					                profile_data = setup_profile_data[mode]["WPA2_P"]["2G"]
 | 
				
			||||||
 | 
					                try:
 | 
				
			||||||
 | 
					                    id = instantiate_profile.create_wpa2_personal_ssid_profile(two4g=True, fiveg=False,
 | 
				
			||||||
 | 
					                                                                               profile_data=profile_data)
 | 
				
			||||||
 | 
					                    profile_id["ssid"].append(profile_data['ssid_name'])
 | 
				
			||||||
 | 
					                    test_cases['ssid_2g_wpa2_' + mode.lower()] = True
 | 
				
			||||||
 | 
					                except:
 | 
				
			||||||
 | 
					                    test_cases['ssid_2g_wpa2_' + mode.lower()] = False
 | 
				
			||||||
 | 
					            if get_markers["fiveg"]:
 | 
				
			||||||
 | 
					                profile_data = setup_profile_data[mode]["WPA2_P"]["5G"]
 | 
				
			||||||
 | 
					                try:
 | 
				
			||||||
 | 
					                    id = instantiate_profile.create_wpa2_personal_ssid_profile(two4g=False, fiveg=True,
 | 
				
			||||||
 | 
					                                                                               profile_data=profile_data)
 | 
				
			||||||
 | 
					                    profile_id["ssid"].append(profile_data['ssid_name'])
 | 
				
			||||||
 | 
					                    test_cases['ssid_5g_wpa2_' + mode.lower()] = True
 | 
				
			||||||
 | 
					                except:
 | 
				
			||||||
 | 
					                    test_cases['ssid_5g_wpa2_' + mode.lower()] = False
 | 
				
			||||||
 | 
					        if get_markers[i] and i == "wpa2_enterprise":
 | 
				
			||||||
 | 
					            if get_markers["twog"]:
 | 
				
			||||||
 | 
					                profile_data = setup_profile_data[mode]["WPA2_E"]["2G"]
 | 
				
			||||||
 | 
					                try:
 | 
				
			||||||
 | 
					                    id = instantiate_profile.create_wpa2_enterprise_ssid_profile(two4g=True, fiveg=False,
 | 
				
			||||||
 | 
					                                                                                 profile_data=profile_data)
 | 
				
			||||||
 | 
					                    profile_id["ssid"].append(profile_data['ssid_name'])
 | 
				
			||||||
 | 
					                    test_cases['ssid_2g_eap_' + mode.lower()] = True
 | 
				
			||||||
 | 
					                except:
 | 
				
			||||||
 | 
					                    test_cases['ssid_2g_eap_' + mode.lower()] = False
 | 
				
			||||||
 | 
					            if get_markers["fiveg"]:
 | 
				
			||||||
 | 
					                profile_data = setup_profile_data[mode]["WPA2_E"]["5G"]
 | 
				
			||||||
 | 
					                try:
 | 
				
			||||||
 | 
					                    id = instantiate_profile.create_wpa2_enterprise_ssid_profile(two4g=False, fiveg=True,
 | 
				
			||||||
 | 
					                                                                                 profile_data=profile_data)
 | 
				
			||||||
 | 
					                    profile_id["ssid"].append(profile_data['ssid_name'])
 | 
				
			||||||
 | 
					                    test_cases['ssid_5g_eap_' + mode.lower()] = True
 | 
				
			||||||
 | 
					                except:
 | 
				
			||||||
 | 
					                    test_cases['ssid_5g_eap_' + mode.lower()] = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Create Equipment AP Profile Here
 | 
				
			||||||
 | 
					    profile_data = {
 | 
				
			||||||
 | 
					        "profile_name": "Equipment-AP-" + mode
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        print(" -- Tear Down --")     
 | 
					        instantiate_profile.set_ap_profile(profile_data=profile_data)
 | 
				
			||||||
        report.test_stop(TestResultFactory.create_failure)
 | 
					        test_cases['ap_' + mode.lower()] = True
 | 
				
			||||||
        print('Report-Url: ' + report.report_url() + '\n')
 | 
					    except:
 | 
				
			||||||
        driver.close()
 | 
					        test_cases['ap_' + mode.lower()] = False
 | 
				
			||||||
    except Exception as e:
 | 
					    yield test_cases
 | 
				
			||||||
        print(" -- Exception Not Able To close --")    
 | 
					
 | 
				
			||||||
        print (e.message)
 | 
					
 | 
				
			||||||
    finally:
 | 
					@pytest.fixture(scope="function")
 | 
				
			||||||
        try:
 | 
					def update_ssid(request, instantiate_profile, setup_profile_data):
 | 
				
			||||||
            driver.quit()
 | 
					    requested_profile = str(request.param).replace(" ", "").split(",")
 | 
				
			||||||
        except Exception as e:
 | 
					    profile = setup_profile_data[requested_profile[0]][requested_profile[1]][requested_profile[2]]
 | 
				
			||||||
            print(" -- Exception Not Able To Quit --")    
 | 
					    status = instantiate_profile.update_ssid_name(profile_name=profile["profile_name"],
 | 
				
			||||||
            print (e.message)
 | 
					                                                  new_profile_name=requested_profile[3])
 | 
				
			||||||
 | 
					    setup_profile_data[requested_profile[0]][requested_profile[1]][requested_profile[2]]["profile_name"] = \
 | 
				
			||||||
 | 
					        requested_profile[3]
 | 
				
			||||||
 | 
					    setup_profile_data[requested_profile[0]][requested_profile[1]][requested_profile[2]]["ssid_name"] = \
 | 
				
			||||||
 | 
					        requested_profile[3]
 | 
				
			||||||
 | 
					    time.sleep(90)
 | 
				
			||||||
 | 
					    yield status
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,61 +9,52 @@ from selenium.common.exceptions import NoSuchElementException
 | 
				
			|||||||
from selenium.webdriver.common.by import By
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
from appium import webdriver
 | 
					from appium import webdriver
 | 
				
			||||||
from selenium.common.exceptions import NoSuchElementException
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
from conftest import tearDown
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if 'perfecto_libs' not in sys.path:
 | 
				
			||||||
 | 
					    sys.path.append(f'../libs/perfecto_libs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from iOS_lib import closeApp, openApp, verifyUploadDownloadSpeediOS, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@pytest.mark.APToMobileDevice
 | 
				
			||||||
 | 
					@pytest.mark.wifi5
 | 
				
			||||||
 | 
					@pytest.mark.wifi6
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles, create_profiles',
 | 
				
			||||||
 | 
					    [(["NAT"], ["NAT"])],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("create_profiles")
 | 
				
			||||||
class TestVerifyAPToMobileDevice(object):
 | 
					class TestVerifyAPToMobileDevice(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @pytest.mark.sanity
 | 
					    def test_VerifyApTo_MobileDeviceWeb(self, setup_profile_data, get_APToMobileDevice_data, setup_perfectoMobileWeb):
 | 
				
			||||||
    #@pytest.mark.wpa2_personal
 | 
					 | 
				
			||||||
    #@pytest.mark.VerifyApTo_MobileDeviceWeb
 | 
					 | 
				
			||||||
    def test_VerifyApTo_MobileDeviceWeb(self, get_APToMobileDevice_data, setup_perfectoMobileWeb):
 | 
					 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        try:
 | 
					        profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
 | 
				
			||||||
            report = setup_perfectoMobileWeb[1]
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
            driver = setup_perfectoMobileWeb[0]
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            try:  
 | 
					        profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
 | 
				
			||||||
                report.step_start("Google Home Page")     
 | 
					        ssidPassword = profile_data["ssid_name"]
 | 
				
			||||||
                driver.get(get_APToMobileDevice_data["webURL"]) 
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
                elementFindTxt = driver.find_element_by_xpath(get_APToMobileDevice_data["lblSearch"])
 | 
					 | 
				
			||||||
                elementFindTxt.send_keys("Internet Speed Test")
 | 
					 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
                try:
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
                    elelSearch = driver.find_element_by_xpath(get_APToMobileDevice_data["elelSearch"])  
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
                    elelSearch.click()
 | 
					 | 
				
			||||||
                except NoSuchElementException:
 | 
					 | 
				
			||||||
                    print("Enter Not Active...")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                report.step_start("Verify Run Button")           
 | 
					        report = setup_perfectoMobileWeb[1]
 | 
				
			||||||
                driver.find_element_by_xpath(get_APToMobileDevice_data["BtnRunSpeedTest"]).click()
 | 
					        driver = setup_perfectoMobileWeb[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                #get_APToMobileDevice_data["BtnRunSpeedTest"]
 | 
					        #Set Wifi/AP Mode
 | 
				
			||||||
                #get_APToMobileDevice_data["BtnRunSpeedTest"]
 | 
					        set_APconnMobileDevice_iOS("Default-SSID-5gl-perfecto-b", setup_perfectoMobileWeb, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                #Get upload/Download Speed
 | 
					        #Verify Upload download Speed from device Selection
 | 
				
			||||||
                try:
 | 
					        verifyUploadDownloadSpeediOS(setup_perfectoMobileWeb, connData)
 | 
				
			||||||
                    report.step_start("Get upload/Download Speed")   
 | 
					 | 
				
			||||||
                    time.sleep(60)
 | 
					 | 
				
			||||||
                    downloadMbps = driver.find_element_by_xpath(get_APToMobileDevice_data["downloadMbps"])
 | 
					 | 
				
			||||||
                    downloadSpeed = downloadMbps.text
 | 
					 | 
				
			||||||
                    print("Download: " + downloadSpeed + " Mbps")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    UploadMbps = driver.find_element_by_xpath(get_APToMobileDevice_data["UploadMbps"])
 | 
					 | 
				
			||||||
                    uploadSpeed = UploadMbps.text
 | 
					 | 
				
			||||||
                    print("Upload: " + uploadSpeed + " Mbps")
 | 
					 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
                    print("Access Point Verification Completed Successfully")
 | 
					 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
                except NoSuchElementException:
 | 
					 | 
				
			||||||
                    print("Access Point Verification NOT Completed, checking Connection....")
 | 
					 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
                currentResult = True    
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                assert currentResult
 | 
					 | 
				
			||||||
            except Exception as e:
 | 
					 | 
				
			||||||
                print (e.message)
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        except exception as e:
 | 
					 | 
				
			||||||
            print (e.message)
 | 
					 | 
				
			||||||
            tearDown(setup_perfectoMobileWeb)
 | 
					 | 
				
			||||||
     
 | 
					     
 | 
				
			||||||
@@ -1,3 +1,4 @@
 | 
				
			|||||||
 | 
					from logging import exception
 | 
				
			||||||
import unittest
 | 
					import unittest
 | 
				
			||||||
import warnings
 | 
					import warnings
 | 
				
			||||||
from perfecto.test import TestResultFactory
 | 
					from perfecto.test import TestResultFactory
 | 
				
			||||||
@@ -8,44 +9,52 @@ from selenium.common.exceptions import NoSuchElementException
 | 
				
			|||||||
from selenium.webdriver.common.by import By
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
from appium import webdriver
 | 
					from appium import webdriver
 | 
				
			||||||
from selenium.common.exceptions import NoSuchElementException
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
from conftest import closeApp, openApp, ping_deftapps_iOS, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, get_WifiIPAddress_iOS
 | 
					 | 
				
			||||||
#from conftest import 
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if 'perfecto_libs' not in sys.path:
 | 
				
			||||||
 | 
					    sys.path.append(f'../libs/perfecto_libs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ping_deftapps_iOS, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@pytest.mark.TestPassPointConnectivetyIOS
 | 
				
			||||||
 | 
					@pytest.mark.wifi5
 | 
				
			||||||
 | 
					@pytest.mark.wifi6
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles, create_profiles',
 | 
				
			||||||
 | 
					    [(["NAT"], ["NAT"])],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("create_profiles")
 | 
				
			||||||
class TestPassPointConnectivetyIOS(object):
 | 
					class TestPassPointConnectivetyIOS(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #@pytest.mark.sanity
 | 
					    def test_AccessPointConnection(self, setup_profile_data, get_AccessPointConn_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
    #@pytest.mark.wpa2_personal
 | 
					 | 
				
			||||||
    @pytest.mark.TestPassPointConnectivetyIOS
 | 
					 | 
				
			||||||
    def test_AccessPointConnection(self, get_AccessPointConn_data, setup_perfectoMobile_iOS):
 | 
					 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        try:
 | 
					        profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
 | 
				
			||||||
            report = setup_perfectoMobile_iOS[1]
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
            driver = setup_perfectoMobile_iOS[0]
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
            connData = get_AccessPointConn_data
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #Set Wifi/AP Mode
 | 
					        profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
 | 
				
			||||||
            set_APconnMobileDevice_iOS(connData["Default-SSID-perfecto-b"], setup_perfectoMobile_iOS, connData)
 | 
					        ssidPassword = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
            #Need An ip To ping
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
            wifi_ip = get_WifiIPAddress_iOS(setup_perfectoMobile_iOS, connData)
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #Open Ping Application
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
            openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS)
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_AccessPointConn_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip)
 | 
					        #Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        set_APconnMobileDevice_iOS(ssidName, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Need An ip To ping
 | 
				
			||||||
 | 
					        wifi_ip = get_WifiIPAddress_iOS(setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Open Ping Application
 | 
				
			||||||
 | 
					        openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #Toggle AirplaneMode
 | 
					        ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip)
 | 
				
			||||||
            #Toggle_AirplaneMode_iOS(setup_perfectoMobile_iOS, get_ToggleAirplaneMode_data)
 | 
					 | 
				
			||||||
       
 | 
					 | 
				
			||||||
            #Verify AP After AirplaneMode
 | 
					 | 
				
			||||||
            #assert verify_APconnMobileDevice_iOS("Default-SSID-5gl-perfecto-b", setup_perfectoMobile_iOS, get_ToggleAirplaneMode_data)
 | 
					 | 
				
			||||||
         
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        except NoSuchElementException as ex:
 | 
					 | 
				
			||||||
            self.currentResult = False
 | 
					 | 
				
			||||||
            #report.test_stop(TestResultFactory.create_failure("NoSuchElementException", ex))
 | 
					 | 
				
			||||||
            print (ex.message)
 | 
					 | 
				
			||||||
            self.currentResult = True
 | 
					 | 
				
			||||||
     
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,33 +9,53 @@ from selenium.common.exceptions import NoSuchElementException
 | 
				
			|||||||
from selenium.webdriver.common.by import By
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
from appium import webdriver
 | 
					from appium import webdriver
 | 
				
			||||||
from selenium.common.exceptions import NoSuchElementException
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
from conftest import closeApp, openApp, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, tearDown
 | 
					 | 
				
			||||||
#from conftest import 
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if 'perfecto_libs' not in sys.path:
 | 
				
			||||||
 | 
					    sys.path.append(f'../libs/perfecto_libs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@pytest.mark.ToggleAirplaneMode
 | 
				
			||||||
 | 
					@pytest.mark.wifi5
 | 
				
			||||||
 | 
					@pytest.mark.wifi6
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles, create_profiles',
 | 
				
			||||||
 | 
					    [(["NAT"], ["NAT"])],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("create_profiles")
 | 
				
			||||||
class TestToggleAirplaneMode(object):
 | 
					class TestToggleAirplaneMode(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #@pytest.mark.sanity
 | 
					    def test_ToogleAirplaneMode(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
    #@pytest.mark.wpa2_personal
 | 
					 | 
				
			||||||
    #@pytest.mark.VerifyApTo_MobileDeviceWeb
 | 
					 | 
				
			||||||
    #@pytest.mark.parametrize('bundleID-iOS', [net.techet.netanalyzerlite])
 | 
					 | 
				
			||||||
    def test_ToogleAirplaneMode(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS):
 | 
					 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        try:
 | 
					        profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
 | 
				
			||||||
            report = setup_perfectoMobile_iOS[1]
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
            driver = setup_perfectoMobile_iOS[0]
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
            connData = get_ToggleAirplaneMode_data
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #Set Wifi/AP Mode
 | 
					        profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
 | 
				
			||||||
            set_APconnMobileDevice_iOS("Default-SSID-5gl-perfecto-b", setup_perfectoMobile_iOS, get_ToggleAirplaneMode_data)
 | 
					        ssidPassword = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
            #Toggle AirplaneMode
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
            Toggle_AirplaneMode_iOS(setup_perfectoMobile_iOS, get_ToggleAirplaneMode_data)
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #Verify AP After AirplaneMode
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
            assert verify_APconnMobileDevice_iOS("Default-SSID-5gl-perfecto-b", setup_perfectoMobile_iOS, get_ToggleAirplaneMode_data)
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        set_APconnMobileDevice_iOS(ssidName, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Toggle AirplaneMode
 | 
				
			||||||
 | 
					        Toggle_AirplaneMode_iOS(setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					        #Verify AP After AirplaneMode
 | 
				
			||||||
 | 
					        assert verify_APconnMobileDevice_iOS(ssidName, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
         
 | 
					         
 | 
				
			||||||
     
 | 
					     
 | 
				
			||||||
        except exception as e:
 | 
					 | 
				
			||||||
            print (e.message)
 | 
					 | 
				
			||||||
            tearDown(setup_perfectoMobile_iOS)
 | 
					 | 
				
			||||||
     
 | 
					     
 | 
				
			||||||
@@ -9,36 +9,54 @@ from selenium.common.exceptions import NoSuchElementException
 | 
				
			|||||||
from selenium.webdriver.common.by import By
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
from appium import webdriver
 | 
					from appium import webdriver
 | 
				
			||||||
from selenium.common.exceptions import NoSuchElementException
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
from urllib3 import exceptions
 | 
					 | 
				
			||||||
from conftest import closeApp, openApp, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, tearDown
 | 
					 | 
				
			||||||
#from conftest import 
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from urllib3 import exceptions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if 'perfecto_libs' not in sys.path:
 | 
				
			||||||
 | 
					    sys.path.append(f'../libs/perfecto_libs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@pytest.mark.PassPointConnection
 | 
				
			||||||
 | 
					@pytest.mark.wifi5
 | 
				
			||||||
 | 
					@pytest.mark.wifi6
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles, create_profiles',
 | 
				
			||||||
 | 
					    [(["NAT"], ["NAT"])],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("create_profiles")
 | 
				
			||||||
class TestPassPointConnection(object):
 | 
					class TestPassPointConnection(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #@pytest.mark.sanity
 | 
					    def test_PassPointConnection_Mobile(self,setup_profile_data, setup_perfectoMobile_iOS, get_PassPointConniOS_data):
 | 
				
			||||||
    #@pytest.mark.wpa2_personal
 | 
					 | 
				
			||||||
    #@pytest.mark.VerifyApTo_MobileDeviceWeb
 | 
					 | 
				
			||||||
    #@pytest.mark.parametrize('bundleID-iOS', [net.techet.netanalyzerlite])
 | 
					 | 
				
			||||||
    def test_PassPointConnection_Mobile(self, setup_perfectoMobile_iOS, get_PassPointConniOS_data):
 | 
					 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        #bundleId-iOS=net.techet.netanalyzerlite
 | 
					        profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
 | 
				
			||||||
        #Wifi-5G or 2G Verification
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
        try:
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
            report = setup_perfectoMobile_iOS[1]
 | 
					 | 
				
			||||||
            driver = setup_perfectoMobile_iOS[0]
 | 
					 | 
				
			||||||
            connData = get_PassPointConniOS_data
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b
 | 
					        profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
 | 
				
			||||||
            set_APconnMobileDevice_iOS("Default-SSID-5gl-perfecto-b", setup_perfectoMobile_iOS, get_PassPointConniOS_data)
 | 
					        ssidPassword = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
            #Toggle Airplane Mode and Ensure Wifi Connection. 
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
            Toggle_AirplaneMode_iOS(setup_perfectoMobile_iOS, get_PassPointConniOS_data)
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #Close Settings App
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
            closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_PassPointConniOS_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b
 | 
				
			||||||
 | 
					        set_APconnMobileDevice_iOS(ssidName, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Toggle Airplane Mode and Ensure Wifi Connection. 
 | 
				
			||||||
 | 
					        Toggle_AirplaneMode_iOS(setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Close Settings App
 | 
				
			||||||
 | 
					        closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        except exceptions as e:
 | 
					 | 
				
			||||||
            print (e.message)
 | 
					 | 
				
			||||||
            tearDown(setup_perfectoMobile_iOS)
 | 
					 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
        #except exception as ex
 | 
					 | 
				
			||||||
@@ -9,35 +9,52 @@ from selenium.common.exceptions import NoSuchElementException
 | 
				
			|||||||
from selenium.webdriver.common.by import By
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
from appium import webdriver
 | 
					from appium import webdriver
 | 
				
			||||||
from selenium.common.exceptions import NoSuchElementException
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
from conftest import closeApp, openApp, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
 | 
					 | 
				
			||||||
#from conftest import 
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TestToggleAirplaneMode(object):
 | 
					import sys
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #@pytest.mark.sanity
 | 
					if 'perfecto_libs' not in sys.path:
 | 
				
			||||||
    #@pytest.mark.wpa2_personal
 | 
					    sys.path.append(f'../libs/perfecto_libs')
 | 
				
			||||||
    #@pytest.mark.VerifyApTo_MobileDeviceWeb
 | 
					 | 
				
			||||||
    #@pytest.mark.parametrize('bundleID-iOS', [net.techet.netanalyzerlite])
 | 
					 | 
				
			||||||
    def test_ToogleWifiMode(self, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try:
 | 
					from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
 | 
				
			||||||
            report = setup_perfectoMobile_iOS[1]
 | 
					 | 
				
			||||||
            driver = setup_perfectoMobile_iOS[0]
 | 
					 | 
				
			||||||
            connData = get_ToggleWifiMode_data
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #Set Wifi/AP Mode
 | 
					@pytest.mark.ToggleWifiMode
 | 
				
			||||||
            set_APconnMobileDevice_iOS("Default-SSID-5gl-perfecto-b", setup_perfectoMobile_iOS, get_ToggleWifiMode_data)
 | 
					@pytest.mark.wifi5
 | 
				
			||||||
 | 
					@pytest.mark.wifi6
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles, create_profiles',
 | 
				
			||||||
 | 
					    [(["NAT"], ["NAT"])],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #Toggle WifiMode
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
            Toggle_WifiMode_iOS(setup_perfectoMobile_iOS, get_ToggleWifiMode_data)
 | 
					@pytest.mark.usefixtures("create_profiles")
 | 
				
			||||||
 | 
					class TestToggleWifiMode(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #Verify AP After AirplaneMode
 | 
					    def test_ToogleWifiMode(self, setup_profile_data, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
            value = verify_APconnMobileDevice_iOS("Default-SSID-5gl-perfecto-b", setup_perfectoMobile_iOS, connData)
 | 
					 | 
				
			||||||
            assert value
 | 
					 | 
				
			||||||
         
 | 
					         
 | 
				
			||||||
 | 
					        profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        except exception as e:
 | 
					        profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
 | 
				
			||||||
            print (e.message)
 | 
					        ssidPassword = profile_data["ssid_name"]
 | 
				
			||||||
            tearDown(setup_perfectoMobile_iOS)
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleWifiMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        set_APconnMobileDevice_iOS(ssidName, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #Toggle WifiMode
 | 
				
			||||||
 | 
					        Toggle_WifiMode_iOS(setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					        #Verify AP After AirplaneMode
 | 
				
			||||||
 | 
					        value = verify_APconnMobileDevice_iOS(ssidName, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        assert value
 | 
				
			||||||
           
 | 
					           
 | 
				
			||||||
@@ -1,50 +0,0 @@
 | 
				
			|||||||
[pytest]
 | 
					 | 
				
			||||||
addopts= --junitxml=test_everything.xml
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Perfecto Cloud parameters
 | 
					 | 
				
			||||||
perfectoURL=tip
 | 
					 | 
				
			||||||
securityToken=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJqdGkiOiJjYjRjYjQzYi05Y2FiLTQxNzQtOTYxYi04MDEwNTZkNDM2MzgiLCJleHAiOjAsIm5iZiI6MCwiaWF0IjoxNjExNTk0NzcxLCJpc3MiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwiYXVkIjoiaHR0cHM6Ly9hdXRoMi5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvdGlwLXBlcmZlY3RvbW9iaWxlLWNvbSIsInN1YiI6IjdiNTMwYWUwLTg4MTgtNDdiOS04M2YzLTdmYTBmYjBkZGI0ZSIsInR5cCI6Ik9mZmxpbmUiLCJhenAiOiJvZmZsaW5lLXRva2VuLWdlbmVyYXRvciIsIm5vbmNlIjoiZTRmOTY4NjYtZTE3NS00YzM2LWEyODMtZTQwMmI3M2U5NzhlIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiYWNkNTQ3MTctNzJhZC00MGU3LWI0ZDctZjlkMTAyNDRkNWZlIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJyZXBvcnRpdW0iOnsicm9sZXMiOlsiYWRtaW5pc3RyYXRvciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.SOL-wlZiQ4BoLLfaeIW8QoxJ6xzrgxBjwSiSzkLBPYw
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Perfecto CI Report 
 | 
					 | 
				
			||||||
projectName = TIP-Project
 | 
					 | 
				
			||||||
projectVersion = 1.0
 | 
					 | 
				
			||||||
jobName = Tip-CI-Test
 | 
					 | 
				
			||||||
jobNumber = 1
 | 
					 | 
				
			||||||
reportTags = TestTag
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
# iOS Device Capabilities
 | 
					 | 
				
			||||||
platformName-iOS=iOS
 | 
					 | 
				
			||||||
#manufacturer-iOS=Apple
 | 
					 | 
				
			||||||
model-iOS=iPhone-XR
 | 
					 | 
				
			||||||
bundleId-iOS=com.apple.Preferences
 | 
					 | 
				
			||||||
#default iOS settings app
 | 
					 | 
				
			||||||
bundleId-iOS-Settings=com.apple.Preferences
 | 
					 | 
				
			||||||
bundleId-iOS-Ping=com.deftapps.ping
 | 
					 | 
				
			||||||
browserType-iOS=safari
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Android Device Capabilities
 | 
					 | 
				
			||||||
platformName-android=Android
 | 
					 | 
				
			||||||
model-android=Android.*
 | 
					 | 
				
			||||||
appPackage-android=com.android.settings
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
wifi-SSID-5gl-Pwd=12345678
 | 
					 | 
				
			||||||
wifi-SSID-2g-Pwd=12345678
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Default-SSID-5gl-perfecto-b=Default-SSID-5gl-perfecto-b
 | 
					 | 
				
			||||||
Default-SSID-2g-perfecto-b=Default-SSID-2g-perfecto-b
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Default-SSID-perfecto-b=Default-SSID-5gl-perfecto-b
 | 
					 | 
				
			||||||
# iOS Device Parameters
 | 
					 | 
				
			||||||
#testbed-name=nola-ext-03
 | 
					 | 
				
			||||||
##equipment-model=ecw5410
 | 
					 | 
				
			||||||
#sdk-user-id=support@example.com
 | 
					 | 
				
			||||||
#sdk-user-password=support
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Android Device Parameters
 | 
					 | 
				
			||||||
#t#estrail-base-url=telecominfraproject.testrail.com
 | 
					 | 
				
			||||||
#t#estrail-project=opsfleet-wlan
 | 
					 | 
				
			||||||
#testrail-user-id=gleb@opsfleet.com
 | 
					 | 
				
			||||||
#testrail-user-password=use_command_line_to_pass_this
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@@ -31,3 +31,38 @@ filterwarnings =
 | 
				
			|||||||
markers =
 | 
					markers =
 | 
				
			||||||
    sanity: Run the sanity for Client Connectivity test
 | 
					    sanity: Run the sanity for Client Connectivity test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#--- Perfecto parameters -----
 | 
				
			||||||
 | 
					perfectoURL=tip
 | 
				
			||||||
 | 
					securityToken=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJqdGkiOiJjYjRjYjQzYi05Y2FiLTQxNzQtOTYxYi04MDEwNTZkNDM2MzgiLCJleHAiOjAsIm5iZiI6MCwiaWF0IjoxNjExNTk0NzcxLCJpc3MiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwiYXVkIjoiaHR0cHM6Ly9hdXRoMi5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvdGlwLXBlcmZlY3RvbW9iaWxlLWNvbSIsInN1YiI6IjdiNTMwYWUwLTg4MTgtNDdiOS04M2YzLTdmYTBmYjBkZGI0ZSIsInR5cCI6Ik9mZmxpbmUiLCJhenAiOiJvZmZsaW5lLXRva2VuLWdlbmVyYXRvciIsIm5vbmNlIjoiZTRmOTY4NjYtZTE3NS00YzM2LWEyODMtZTQwMmI3M2U5NzhlIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiYWNkNTQ3MTctNzJhZC00MGU3LWI0ZDctZjlkMTAyNDRkNWZlIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJyZXBvcnRpdW0iOnsicm9sZXMiOlsiYWRtaW5pc3RyYXRvciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.SOL-wlZiQ4BoLLfaeIW8QoxJ6xzrgxBjwSiSzkLBPYw
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Perfecto CI Report 
 | 
				
			||||||
 | 
					projectName = TIP-Project
 | 
				
			||||||
 | 
					projectVersion = 1.0
 | 
				
			||||||
 | 
					jobName = Tip-CI-Test
 | 
				
			||||||
 | 
					jobNumber = 1
 | 
				
			||||||
 | 
					reportTags = TestTag
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					# iOS Device Capabilities
 | 
				
			||||||
 | 
					platformName-iOS=iOS
 | 
				
			||||||
 | 
					#manufacturer-iOS=Apple
 | 
				
			||||||
 | 
					model-iOS=iPhone-XR
 | 
				
			||||||
 | 
					bundleId-iOS=com.apple.Preferences
 | 
				
			||||||
 | 
					#default iOS settings app
 | 
				
			||||||
 | 
					bundleId-iOS-Settings=com.apple.Preferences
 | 
				
			||||||
 | 
					bundleId-iOS-Ping=com.deftapps.ping
 | 
				
			||||||
 | 
					browserType-iOS=safari
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Android Device Capabilities
 | 
				
			||||||
 | 
					platformName-android=Android
 | 
				
			||||||
 | 
					model-android=Android.*
 | 
				
			||||||
 | 
					appPackage-android=com.android.settings
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wifi-SSID-5gl-Pwd=12345678
 | 
				
			||||||
 | 
					wifi-SSID-2g-Pwd=12345678
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Default-SSID-5gl-perfecto-b=Default-SSID-5gl-perfecto-b
 | 
				
			||||||
 | 
					Default-SSID-2g-perfecto-b=Default-SSID-2g-perfecto-b
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Default-SSID-perfecto-b=Default-SSID-5gl-perfecto-b
 | 
				
			||||||
 | 
					#--- Perfecto parameters -----
 | 
				
			||||||
		Reference in New Issue
	
	Block a user