I am trying to click a tab button in hybrid app
package android;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.android.AndroidDriver;
import java.io.File;
import java.net.URL;
import java.util.Set;
import java.util.concurrent.TimeUnit;
public class app {
public static void main(String[] args) throws Exception
{
File f= new File("src/123.apk");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "Galaxy Nexus API 23");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("unicodeKeyboard", "true");
capabilities.setCapability("resetKeyboard", "true");
capabilities.setCapability("newCommandTimeout", "45000");
capabilities.setCapability("app", f.getAbsolutePath());
AndroidDriver<WebElement> driver= new AndroidDriver<WebElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
Set<String> contextNames = driver.getContextHandles();
for (String contextName : contextNames) {
System.out.println(contextNames); //prints out something like NATIVE_APP \n WEBVIEW_1
}
driver.context("WEBVIEW_io.ionic.starter"); // set context to WEBVIEW_1
driver.findElementByName("information circle About").click();
driver.quit();
}
}
but this is not working , getting below error
Original error: Failed to start Chromedriver session: A new session could not be created. (Original error: session not created exception: Chrome version must be >= 60.0.3112.0