Run appium tests on android mobile browser using java

mobilebrowserWe have seen how to run appium tests on android native apps

In this post, we will be learning how to run appium tests on android handset browsers like Chrome, Firefox, Dolphin or android browser..

application examples on browsers are like, etc…

for native apps (.apk files), we use uiautomatorviewer.bat to identify elements on the AUT.


In this post, we will be using chrome browser.

NOTE: If chrome browser is not installed on the mobile, then install it from play store,

To install chrome on the emulator such as Genymotion (it might throw error as INSTALL_FAILED_NO_MATCHING_ABIS), follow install ARM translator for setup and install chrome browser using adb command.

Identifying mobile browser elements

Identifying Web elements on the mobile handset browsers and desktop browsers are almost same (follow selenium locators), may be differs the way it appears on mobile browsers…

Open in desktop browser and identify the elements using selenium locators and use the same for appium tests to run on mobile browsers.

we need to change/add certain capabilities for browser automation as compared to tests on native apps,

let’s look into the code implementation


Content posted is based on learning or working experience,
Share the post with others if find useful,
Any queries?, leave comments or discuss on our, Thanks!

1 Response

  1. James says:

    This wouldn’t work. The AndroidDriver is never being instantiated.
    AndroidDriver driver = new AndroidDriver(capabilities);
    AndroidDriver driver = new AndroidDriver(URL, capabilities);

Leave a Reply

Your email address will not be published. Required fields are marked *