I was trying to automate tests for a hybrid app, while , it only shows name native . is shown as webview_undefined.

Set<String>  contextNames = driver.getContextHandles();
for (String contextName : contextNames) 
{
     System.out.println(contextName);
     if (contextName .contains("WEBVIEW"))
     {
         driver.context(contextName); 
        webViewFound = true; 
        System.out.println("switched to webview");
    }
}

I’m using the above code. Can anyone give solution for this !



Source link https://sqa.stackexchange.com/questions/20795/switching-to-webview-context-

LEAVE A REPLY

Please enter your comment!
Please enter your name here