I can't get to WebView on iOS 16.4

Hi everyone,

I have the following problem. I want to access a WebView in iOS (in app browser). A month ago, everything was working. I could find the context and switch. Now the whole thing does not work anymore. I can’t switch a context anymore. The output of the existing contexts shows that Appium does not find any WebView anymore. Is anyone else experiencing this?
I have already tried the following:

  • Project to the state where it was working
  • xcuitest driver to the state the project was working with.
    Both make no difference.

Or does it have something to do with the latest security updates from Apple? The device on which the entire thing is running is up-to-date with the updates.

I would be very happy if someone could help me.

first test access to webView using Safari browser.

example: e.g. https://www.browserstack.com/guide/how-to-debug-on-iphone

i tried to acces the webView using Safari but no chance. It seems like i am not able to see the webView.

So only your app dev can help and open webView.

@Aleksei it’s not about devs, I have the same problem on my app. All is allowed for me and before I used webviews in app without any problems and I was able to see WebView when used getContextList(), now I see ONLY ```
“id”: “NATIVE_APP”

When I know and inspector also says, that there is webview "XCUIElementTypeWebView"

if you cant see WebView with Safari browser Appium cant also. no magic. Appium uses same as native XCUItest.

I think I found the issue. At least for my problem.
Did you upgrade your device to iOS 16.4 ?
Because with this update, an internal variable isInspectable from the WebView was set to false as default. This makes the WebView not inspectable if this is not set to true.
Therefor it is not an issue of appium , i tried it with an older iOs Version and everything work as before, while on the device with the newest iOS Version it did not.

maybe just needed again enable automation after update?

So to make it workable you suggest to use other ios version than 16.4? Or for 16.4 version you have some solution?

Not necessarily. It depends on which WebView you are using. If you use it directly from apple, then there is the possibility for the devs to access the porperty is Inspectable (https://developer.apple.com/documentation/webkit/wkwebview/4111163-inspectable/ ) and set it to True (https://webkit.org/blog/13936/enabling-the-inspection-of-web-content-in-apps/ ). Then it should work again. If you use UniWebView like us, then there is no solution. I have made them aware of the problem, and they will take care of it in a release.


thank you! This worked for me.