I am not able to find the elements from android.webkit.webview package using java appium script.
How to get the userText field and password field locators.so that i can pass the value to UI using the Appium script
I am not able to find the elements from android.webkit.webview package using java appium script.
How to get the userText field and password field locators.so that i can pass the value to UI using the Appium script
Go to https://developer.chrome.com/devtools/docs/remote-debugging
get below property enabled by developer
http://developer.android.com/reference/android/webkit/WebView.html#setWebContentsDebuggingEnabled(boolean)
Once it is done. use below code
By webView = By.className("android.webkit.WebView");
WebDriverWait wait = new WebDriverWait(driver,300);
wait.until(ExpectedConditions.visibilityOfElementLocated(webView));
Set<String> availableContexts = driver.getContextHandles();
System.out.println("Total No of Context Found = "+ availableContexts.size());
for(String context : availableContexts) {
if(context.contains("WEBVIEW")){
System.out.println("Context : " + context);
driver.context(context);
break;
}
}