WebView treated like native in Appium Inspector and cannot switch to webview to find elements

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

Appium inspector cannot inspect web views. Consider using remote Safari debugger for this purpose

That is what I have read. However, we are identifying elements in Appium Inspector and that is why I am confused. I have access to the code and can see that these screens are actually web views. Why can I see them in Appium Inspector, and why can’t I locate them using css?

css locators make no sense in native context, because elements there have no css properties.

Yes! I am asking about a Web View within the app.