Follow

How to run mobile web automation on Android

Following are possible ways for mobile web for android platform.

  1. Using chromedriver for  mobile chrome on  emulator/device
  2. Using appium for  mobile chrome on  emulator/device

See also: How to run mobile web app Automation on Android
 

Using chromedriver for  mobile chrome on  emulator/device

  1. Download chrome driver
  2. set driver as chrome driver

    selenium.defaultBrowser=chromeDriver

  3. set property webdriver.chrome.driver property

    webdriver.chrome.driver=d:/chromedriver.exe

  4. Set chrome.additional.capabilities to run test on mobile chrome.
  5. Start emulator or connect device
  6. Make sure chrome browser is installed in emulator/device
  7. Run tests.....

 Using appium for  mobile chrome on  emulator/device

  1. Make sure Appium java client lib is in your ivy/class path

    <dependency org="io.appium" name="java-client" rev="1.6.2"/>

  2. set driver as appium Driver

    selenium.defaultBrowser=appiumDriver

  3. Set additional capabilities, you need to provide "app" value "Chrome". Here is the sample

    appium.additional.capabilities={'deviceName':'<device_id>','platformName':'Android','automationName':'Appium','browserName': 'Chrome', 'driver.class' : 'io.appium.java_client.android.AndroidDriver'}

  4. Start emulator or connect device where appium server is running
  5. Make sure chrome browser is installed in emulator/device
  6. Run tests....
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk