Unable to find UIWebView in iOS Hybrid App_xCode9_Appium1.7.1_iOS10.3.3 and above

Hi Team,

I am working with iOS Hybrid App, I need to test app on Real device with Latest iOS versions 10.3.3 and above.

Currently when I lands on UIWebView(it opens within the App not in safari) in the app and wait for almost 25-30 seconds still I am unable to find a UIWebView in getContextHandles(), it returns only native view.

A. Tried to launch iOS-webkit-debug proxy from capabilities - Unable to find UIWebView

  1. Capabilities.setCapability(“startIWDP”, true);
  2. Capabilities.setCapability(“webkitDebugProxyPort”, “27753”);

B. Tried to launch Manually iOS-webkit-debug proxy- Unable to find UIWebView

  1. Start Appium server: appium --webkit-debug-proxy-port 27753
  2. Start iOS-webKit-proxy: ios_webkit_debug_proxy -c myDeviceUDID:27753 -d

C. Tried Manual proxy- Unable to find UIWebView

  1. launch iOS-webKit-proxy: ios_webkit_debug_proxy -c myDeviceUDID:27753 -d
  2. In App Navigate to the webContent page (it opens within the App not in safari)
  3. Open url http://localhost:27753/json
  4. Empty response - {}

And when I try to launch safari and go to any random website, url http://localhost:27753/json, it shows response
[{
“devtoolsFrontendUrl”: “/devtools/devtools.html?ws=localhost:27753/devtools/page/1”,
“faviconUrl”: “”,
“thumbnailUrl”: “/thumb/xyz/”,
“title”: “xyzzy”,
“url”: “xyzzy”,
“webSocketDebuggerUrl”: “ws://localhost:27753/devtools/page/1”,
“appId”: “PID:xyz”
}]

Can someone please help me to understand what exactly I am missing, or is there any open issue ?

From Appium 1.7 Release Notes - known issues, I found “Parallel Safari/Webview sessions are not working due to an Apple bug”.

Below are the versions on which I am working
iOS: 10.3.3
Device: 7plus
xCode: 9
Appium: 1.7.1
Java client: 5.0.3
selenium: 3.6.0
ios_webkit_debug_proxy 1.8

Thanks
Masood

1 Like

@isaac can you please help with this ticket.

@Masoodmd0786 Were you able to get pass this? I, too, am using a real iOS device and unable to get the content of the UIWebView.

@Derrik_Ammons Locally on simulators/Real device on cloud(Sauce) I am able to inspect webview on iOS 11.

Facing the same issue. Any help will be appreciated.

Buddy, start working with local simulators or sauce labs real device… I have been in mobile industry since it was started from almost 3-4 years and per my experience local device is not feasible you will face network and bunch of issues… mobile automation always needs to be tested using cloud environments :slight_smile:

1 Like