I am trying to test a hybrid app built with Ionic/Cordova on an Android device, writing my tests in Java. When I switch contexts from NATIVE_APP to WEBVIEW_com.company.app, I'm able to access the "html" root element and some sub-elements...but the "body" element is empty. After some poking around, I found that I could use Google Chrome's chrome://inspector page to see webviews that are running on my Android device. Here's what I get from that page with my device connected:
It seems that I'm getting the WebView (or context...not really sure what the right terminology is here) with the doubleclick.net URL, rather than the one that's pointing at index.html. Is there a way in Appium to select the correct item when writing the tests in Java?
Edit: Appium 1.4.0.0 on Windows, Android, real device (Samsung Galaxy S Relay 4G running CyanogenMod 11), writing tests in Java...I think that covers everything that the pinned post requests.