Hi,
I have a problem in switching my Hybrid application from Native APP context view to Web Context view with new Appium 1.6.4 version.
can you please let me know if anyone encountered this ?
Sample Code Used:
Set<String> contextName = driver.getContextHandles();
System.out.println(contextName);
for (String contexts : contextName) {
System.out.println(contexts);
if (contextName.contains("NATIVE_APP")) {
System.out.println("Show me:" + contextName);
Thread.sleep(1500);
driver.context("NATIVE_APP");
driver.findElement(By.xpath("//android.widget.Button[@text='Set']")).click();
}
if (contextName.contains("WEBVIEW")) {
driver.context("WEBVIEW");
driver.findElement(By.xpath("//android.widget.Button[@text='Set']")).click();
}