Android chrome app automation using Appium

To automate the chrome browser in Android phone, you will have to start the android emulator and appium server. If emulator does not connect to internet, you will have to add the dns server as in network settings and then restart the emulator.

If chrome does not open the url, you might have to set the chromedriver binary when starting the appium server. When I executed my code, chrome was not started because chrome version was 66 and chromedriver binary was not compatible. So I used chromedriver 2.4 and set that path when starting the appium as shown in below code.
appium --chromedriver-executable /Users/admin/chromedriver2.4
Alternatively, you can pass the executable in the capability.
caps.setCapability("chromedriverExecutable", "/Users/admin/Downloads/chromedriver77");

Before we dive into the example, let me tell you what maven dependencies, you will require to run the tests.


If you are using, You will need to download nuget package - Appium.WebDriver

Below example shows how to automate the chrome browser.

import io.appium.java_client.ios.IOSDriver;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

import java.util.concurrent.TimeUnit;

 * Created by Sagar on 10-07-2016.
public class WebAppTest {
    WebDriver driver;
    public void test1() throws Exception{
        DesiredCapabilities caps = new DesiredCapabilities();
        caps.setCapability("platformName", "android");

        caps.setCapability("deviceName", "Pixel 9");
       // caps.setCapability("platformVersion", "7.0.0");

        caps.setCapability(CapabilityType.BROWSER_NAME, "Chrome");
try {
    driver = new RemoteWebDriver(new URL(""), caps);
    driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);


}catch (Exception ex) {



Chrome app automation using appium

Web development and Automation testing

solutions delivered!!