Workaround approach to resolve some common issues related to WebDriverAgent on iOS

Before reading below tips, make sure you’ve completed setup guide on iOS first.

During my working session with iOS devices, there have been a lot of problems related to WebDriverAgent(WDA). Some of the most common problems I’ve been facing are:

  • Could not proxy command to remote server
  • Xcodebuild failed with code 65
  • Got an unexpected response: {“errno”:“ECONNRESET”,“code”:“ECONNRESET”,“syscall”:“read”}

Actually most of the time I’ve figured out that WDA start-up process is not successful in these cases, so based on the official documentation regard to XCUITest engine used for iOS testing:

We can add this capability with the value of 4 to iOS settings

wdaStartupRetries

This capability will retry WDA start-up session and therefore will reduce the appearance of the above-mentioned issues. The trade-off is it will take longer time (+ 5 secs) for an execution session due to WDA is restarted.

Thanks

1 Like