question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebDriverAgent taking too long to start running.

See original GitHub issue

The problem

While running scripts on a iOS device, the webdriveragent takes more than 60 seconds to start running.

The tests eventually run and pass but the execution time of each test is extremely high.

Environment

  • Appium version (or git revision) that exhibits the issue: v1.12.1
  • Desktop OS/version used to run Appium: OSX 10.14.4
  • Node.js version (unless using Appium.app|exe): v10.15.3
  • Mobile platform/version under test: iOS v.12.2
  • Real device or emulator/simulator: Simulator iPhone Xs

Details

On running tests on iOS device/simulator, the WebDriverAgent takes too long to start and subsequently each test takes a lot of time to run.

Link to Appium logs

https://gist.github.com/AnujDasari/5c342433fd47043f3dec0cadf1f1e844

Code To Reproduce Issue [ Good To Have ]

capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone Xs");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "12.2");
capabilities.setCapability(MobileCapabilityType.APP, "/Users/anuj/Downloads/Demo.app");
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.IOS_XCUI_TEST);
capabilities.setCapability("useNewWDA", true);

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
mykola-mokhnachcommented, May 28, 2019

Closed as third party issue

0reactions
mykola-mokhnachcommented, May 23, 2019

is there anything else I can do to reduce this delay?

You can try to disable useNewWDA cap. Setting it to true enforces WDA rebuilding for each session. Proper use of useXctestrunFile and usePrebuiltWDA caps might also reduce the init time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimizing WebDriverAgent Startup Performance - HeadSpin
Running the tests, it's easy to notice that the app gets reinstalled on the simulator for each test. This takes a lot of...
Read more >
Unable to launch WebDriverAgent because of xcodebuild failure
Original error: Unable to launch WebDriverAgent because of xcodebuild ... Now when I launch a session it either does not work or it...
Read more >
Appium (and desktop) unable to launch wda session since ...
I solved it by adding appium desired capabilities and I reduced the time from 120 to 60 for newCommandTimeout capabilities.
Read more >
Xcode is unable to correctly run W… | Apple Developer Forums
Xcode is consistently failing to launch WebDriverAgent on an ipad 3 correctly causing it to launch several times and fail. Error: Xcode encountered...
Read more >
Set up Appium on macOS for Testing iOS Devices
5. Install WebDriverAgent · In the Terminal window, go to the directory specified above and run the following command: mkdir -p Resources/WebDriverAgent. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found