I am testing a hybrid iOS mobile application. The first 2 screens are native, and then after that, there is a registration flow that is a WebView, and after registration the app goes back to native.
My question is that for the WebView screens, the Appium Inspector displays it to me as if it is a native screen. It gives me xpath identifiers for it that look like native elements (but are really slow to identify).
Further, I don’t seem to be able to interact with those screens in Appium as if they are web elements. When I try to identify them using the id of the web element, Appium says css selector is not a valid locator strategy. I have tried adding a line of code that switches to a webview if it finds one, but frankly, I don’t see any sign in the appium logs that it actually tries this (though it also does not show an error about it).
I don’t understand what is happening here and would like to.
For deeper details, see the same question on StackOverflow: https://stackoverflow.com/questions/57010493/webview-treated-like-native-in-appium-inspector-and-cannot-switch-to-webview-to