I am trying to automate Selendroid’s test App .
That has a Hybrid View.
Even after changing the context,I am not able to perform any activity on the WebView.
Test App: /selendroid-test-app-0.17.0.apk from Selendroid UI
Appium Version: 1.6.5
Script:
driver.findElementById(“io.selendroid.testapp:id/buttonStartWebview”).click();
Set<String> views = driver.getContextHandles();
Iterator it=views.iterator();
while(it.hasNext()){
System.out.println(it.next());
}
driver.context("WEBVIEW_io.selendroid.testapp");
Thread.sleep(3000);
System.out.println("Current view is"+driver.getContext());
System.out.println(driver.getPageSource());
driver.findElement(By.xpath("//*[@id='name_input']")).sendKeys("test");;
Eclipse Log
[TestNG] Running:
NATIVE_APP
WEBVIEW_io.selendroid.testapp
Current view isWEBVIEW_io.selendroid.testapp
Prefered Car:
VolvoMercedesAudi