Skip to content

Commit

Permalink
Fix the behaviour of autoLaunch capability (#1026)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Aug 6, 2019
1 parent e80630a commit fbe7d23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -138,6 +138,7 @@ Differences are noted here:
|`useSimpleBuildTest`| Build with `build` and run test with `test` in xcodebuild for all Xcode version if this is `true`, or build with `build-for-testing` and run tests with `test-without-building` for over Xcode 8 if this is `false`. Defaults to `false`. | `true` or `false` |
|`wdaEventloopIdleDelay`|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`|
|`processArguments`|Process arguments and environment which will be sent to the WebDriverAgent server.|`{ args: ["a", "b", "c"] , env: { "a": "b", "c": "d" } }` or `'{"args": ["a", "b", "c"], "env": { "a": "b", "c": "d" }}'`|
|`autoLaunch`|When set to `false`, prevents the application under test from being launched automatically as a part of the new session startup process. The launch become the responsibility of the user. Defaults to `true`.|`true` or `false`|

### Simulator control capabilities:

Expand Down
7 changes: 1 addition & 6 deletions lib/driver.js
Expand Up @@ -912,7 +912,7 @@ class XCUITestDriver extends BaseDriver {

let desired = {
desiredCapabilities: {
bundleId,
bundleId: this.opts.autoLaunch === false ? undefined : bundleId,
arguments: args,
environment: env,
eventloopIdleDelaySec,
Expand Down Expand Up @@ -1079,11 +1079,6 @@ class XCUITestDriver extends BaseDriver {
if (this.isSafari()) {
return;
}
// if user has passed in desiredCaps.autoLaunch = false
// meaning they will manage app install / launching
if (this.opts.autoLaunch === false) {
return;
}

try {
await verifyApplicationPlatform(this.opts.app, this.isSimulator(), isTvOS(this.opts.platformName));
Expand Down

0 comments on commit fbe7d23

Please sign in to comment.