Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the eventloopIdleDelaySec capability (wdaEventloopIdleDelay for users) #881

Merged
merged 7 commits into from
Mar 6, 2019

Conversation

dmissmann
Copy link
Contributor

Add support for handling the eventloopIdleDelaySec capability in WDA (appium/WebDriverAgent#140).

lib/driver.js Outdated Show resolved Hide resolved
README.md Outdated
@@ -162,6 +162,7 @@ Differences noted here
|`permissions`| Allows to set permissions for the specified application bundle on Simulator only. The capability value is expected to be a valid JSON string with `{"<bundleId1>": {"<serviceName1>": "<serviceStatus1>", ...}, ...}` format. It is required that `applesimutils` package is installed and available in PATH. The list of available service names and statuses can be found at https://github.com/wix/AppleSimulatorUtils. | e. g. `{"com.apple.mobilecal": {"calendar": "YES"}}` |
|`screenshotQuality`| Changes the quality of phone display screenshots following [xctest/xctimagequality](https://developer.apple.com/documentation/xctest/xctimagequality?language=objc) Default value is `1`. `0` is the highest and `2` is the lowest quality. You can also change it via [settings](https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/settings.md) command. `0` might cause OutOfMemory crash on high-resolution devices like iPad Pro. | e.g. `0`, `1`, `2` |
|`skipLogCapture`|Skips to start capturing logs such as crash, system, safari console and safari network. It might improve performance such as network. Log related commands will not work. Defaults to `false`. |`true` or `false`|
|`eventloopIdleDelaySec`|Delays the invocation of `-[XCUIApplicationProcess setEventLoopHasIdled:]` by the number of seconds specified with this capability. This can help quiescence apps that fail to do so for no obvious reason (and creating a session fails for that reason). This increases the time for session creation because `-[XCUIApplicationProcess setEventLoopHasIdled:]` is called multiple times. If you enable this capability start with at least `3` seconds and try increasing it, if creating the session still fails. Defaults to `0`. |e.g. `5`|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@imurchie
Copy link
Contributor

imurchie commented Mar 4, 2019

I think the name of this is confusing. I would add a WDA in there somewhere, to distinguish from, say, the Node event loop.

@@ -168,6 +168,9 @@ let desiredCapConstraints = _.defaults({
skipLogCapture: {
isBoolean: true
},
eventloopIdleDelaySec: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdaEventloopIdleDelay here as README?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes of course. Mixed the two names up...

lib/driver.js Outdated
@@ -844,6 +844,7 @@ class XCUITestDriver extends BaseDriver {
let maxTypingFrequency = util.hasValue(this.opts.maxTypingFrequency) ? this.opts.maxTypingFrequency : 60;
let shouldUseSingletonTestManager = util.hasValue(this.opts.shouldUseSingletonTestManager) ? this.opts.shouldUseSingletonTestManager : true;
let shouldUseTestManagerForVisibilityDetection = false;
let wdaEventloopIdleDelay = this.opts.eventloopIdleDelaySec || 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let eventloopIdleDelaySec = this.opts. wdaEventloopIdleDelay || 0 and eventloopIdleDelaySec as a desired capability in create session below?

Copy link
Member

@KazuCocoa KazuCocoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. appium/WebDriverAgent@f6a3d66...5896cce has no changes, so is this no problem??

@dmissmann
Copy link
Contributor Author

@KazuCocoa the commit for the WDA submodule was already bumped to the most recent commit. And the required changes were already merged here: appium/WebDriverAgent@5896cce so there's no need to do anything else here

@KazuCocoa KazuCocoa changed the title Add the eventloopIdleDelaySec capability Add the eventloopIdleDelaySec capability (wdaEventloopIdleDelay for users) Mar 6, 2019
@KazuCocoa KazuCocoa merged commit 26a6dbc into appium:master Mar 6, 2019
khanayan123 pushed a commit to khanayan123/appium-xcuitest-driver that referenced this pull request May 10, 2021
* updated WDA submodule

* added the eventloopIdleDelaySec capability

* added documentation

* replaced the ternary if

* renamed capability

* fixed the naming mixup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants