Lunching Chrome Browser in Real Device

TestNG test to lunch Chrome Browser in Real Device:



package com.test.testBrowser;

import io.appium.java_client.AppiumDriver;


import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.Test;

public class NewTest {
public void testMyBrowser() throws MalformedURLException {

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“automationName”, “appium”);
capabilities.setCapability(“platformName”, “Android”);
capabilities.setCapability(“platformVersion”, “5.0.2”);
capabilities.setCapability(“deviceName”, “”); //LGD41062815747
capabilities.setCapability(“app”, “chrome”);

URL seleniumGridUrl = new URL(“”);

//start up an AppiumDriver session
System.out.println(“Starting Appium Driver…”);
AppiumDriver ad = new AndroidDriver(seleniumGridUrl, capabilities);

System.out.println(“Driver Start : Done”);



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s