0

I have a problem while switching from native view to webview in Android while testing on MAC OS. But the same scripts works fine in windows. In Mac it gives chrome not reachable as a webdriver exception or some times session not found exception. I'm using Appium with Eclipse in Mac. I tried replacing different version of chromedriver but none of them worked. Any solution for this!

Thanks

1
  • please post the error Commented Aug 24, 2018 at 4:12

1 Answer 1

0

I am using same environment as you described and working fine. Dinesh give a try:

Set<String> contextNames = ad.getContextHandles();      
System.out.println("Context Names:"+contextNames.toString());

String lastestContextView = (String) contextNames.toArray()[contextNames.size()-1];

if (lastestContextView.contains("WEBVIEW_"))
{
    ad.context(lastestContextView);
    System.out.println("Latest Context Name"+lastestContextView);
}                   
Thread.sleep(5000);
ad.context("NATIVE_APP");
2
  • where should I use this? For native switch or webview ? Commented Sep 19, 2016 at 16:55
  • Webview to Native man,Simple Commented Sep 19, 2016 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.