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

  • please post the error – sameer joshi Aug 24 '18 at 4:12
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");
  • where should I use this? For native switch or webview ? – Dinesh Kumar Sep 19 '16 at 16:55
  • Webview to Native man,Simple – NarendraC Sep 19 '16 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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