I trying to automate a hybrid app using the appium-selenium setup. I facing problem in getting the object properties. I am using ui automator to identify elements but it is unable to do the job. It is only identifying the outer or parent frame of the app and doesn't go beyond that.
My appium version : 1.3.4.1 Chromedriver version: 2.4
I tried in both emulators (Genymotion) and physical devices.
Device environment: Android 4.2 above
For handling hybrid apps we have to switch the contexts between Native view and Webview according to our needs.
Set<String> contextNames = driver.getContextHandles();
for (String contextName : contextNames) {
// prints out something like NATIVE_APP or WEBVIEW_*
System.out.println(contextName);
}
driver.context(contextNames.toArray()[1].toString()); // set context to
// WEBVIEW_*
But for Hybrid apps (developed using Angulas JS in my case) i could not find any tool to get the object properties. Only way i could find in using the inspect element feature of chrome and getting the xpath. However i was able to use inspect element only on emulators(genymotion). It did not work on real devices for me.
Would be good if any one could shed some more light on that area.