How to install Chrome Browser in Android Emulator

Can you try with updated version of ChromeDriver server? There was an issue with a previous version of Appium and the ChromeDriver.exe that came pre-bundled with.

You can get latest one from: Sign in - Google Accounts

Replace the newly downloaded ChromeDriver.exe file with the one located in “D:\softies\Programs\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe”

Below is a very basic script (it just opens up a single page) that I have that works. This is using appium v1.3.6, chromedriver v2.14, JUnit4, android 5.0 avd, and default browser. Hopefully this helps get you started.

import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.MobileCapabilityType;

public class AppiumWebTest {
private AndroidDriver driver;

@Before
public void setUp() throws Exception
{
    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"ANDROID");
    capabilities.setCapability(MobileCapabilityType.PLATFORM, "ANDROID");
    capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "BROWSER");
    driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
@Test
public void test() throws Exception
{
  driver.get("http://appium.io/");
}
@After
public void tearDown() throws Exception
{
	driver.quit();
}

}

1 Like