WebDriverAgent taking too long to start running.
See original GitHub issueThe 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:
- Created 4 years ago
- Comments:5
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Closed as third party issue
You can try to disable
useNewWDA
cap. Setting it to true enforces WDA rebuilding for each session. Proper use ofuseXctestrunFile
andusePrebuiltWDA
caps might also reduce the init time.