Mobile Web Execution on Mobile Device

QAS provides capabilities to execute your mobile web tests on device's browser to let you check how the website works on real devices. For Android, the test can be run on Chrome browser and for iOS, the test can be run on Safari browser. The execution is carried out with the help of Appium which is similar to Android and iOS Native app execution. 

 

Step 1. Start Appium

[A] If you are using Appium with CLI

Start Appium with one param called chromedriver-executable. This param takes path of your chrome driver, which must match the Chrome version on mobile.

Syntax:
appium --chromedriver-executable /path/to/my/chromedriver

Example: 
appium --chromedriver-executable D:\mobileweb\chromedriver.exe

Note: chromedriver-executable is required only for Android Chrome execution.

 

[B] If you are using Appium Desktop Application

Start the Appium desktop application. You can find three tabs: Simple, Advanced and Presets.

Open the Advanced tab. You can find the Chromedriver Binary Path at the bottom. Choose your chromedriver file as per the Chrome version on the mobile for Android.

 

Step 2. Execute Mobile Web (Device)

1. Go to QMetry Automation Studio.

2. Open the mobile web test case with steps.

3. Select Execute > Mobile Web (Device) > Android.


Sample capabilities for Android Chrome  

{ "platformName": "Android", "platformVersion": "", "deviceName": "emulator-5554", "noReset": true, "automationName": "UiAutomator2", "browserName": "Chrome", "fullReset": false, "autoWebview": false, "newCommandTimeout": "3000", "idleTimeout": "3000" }

 

 

Sample capabilities for iOS Safari

{ "platformName": "iOS", "automationName": "XCUITest", "deviceName": "iPhone XR", "fullReset": false, "noReset": true, "platformVersion": "12.1", "browserName": "Safari" }

Initiate the Execution on Mobile

Once you defined the capabilities on the Capabilities window, click Start to initiate the execution on device.