public WebDriver mobileChromeDriver() throws MalformedURLException {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("chromedriverExecutable",
"C:\\eclipse-workspace\\AppiumTestCases\\chromedriver.exe");
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, BrowserType.CHROME);
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "my phone");
capabilities.setCapability(MobileCapabilityType.VERSION, "8.0");
URL url = new URL("http://127.0.0.1:4723/wd/hub");
driver = new AndroidDriver(url, capabilities);
return driver;
}
No comments:
Post a Comment