1

I've been knocking my head against the wall for a couple days now and could use some help on figuring out if there's a bug in Appium 1.20.2 for iOS devices on 14.4 (Xcode 12.4) or if I missed some crucial configuration in running tests on real devices.

I'm attempting to run some XCUITest via Appium (packaged with Webdriver.io) on my hybrid app. I can't seem to see my WKWebView when I run on a physical device.

My code is pretty boilerplate as far as WDIO is concerned:

let contexts = driver.getContexts()
var foundContext = null
for (var context of contexts) {
  if (context.indexOf("WEBVIEW") > -1) foundContext = context
}

The code returns the web view instance on a Simulator device running iOS 14.4 (iPhone XR) which has me thinking this is either my device configuration or Appium.

The other interesting thing is that the web view isn't even visible in ios-web-driver-proxy if I run that separate and attempt to access the web view in a test or outside of one.

Things I've tried:

  • Dumping Safari/web logs out during test runs; no logs are reporting anything for my device
  • Dumping Xcode logs via Appium/WDIO only shows the native clicks I'm performing
  • Enabling ios-web-driver-proxy manually didn't result in any attempts to access either
  • Running Safari on my device with IWDP and even the Safari remote debugger without IDWP results in me being able to see what's happening in there
  • I also changed the timeouts in Jasmine and my webviewConnectTimeout to around two minutes (120000ms) and neither resulted in any change

The only difference I can think of is that my Simulator is running the .app, Sim-targeted version of the app while my real device is using an .ipa I'm pulling separately. Yet, I'd find that to be a strange thing to bar access to the web view.

0 Answers0