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

chore: remove autoLaunch #1332

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ Capability | Description
|`appium: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` |
|`appium: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`|
|`appium: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" }}'`|
|`appium: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`|
|`appium:allowProvisioningDeviceRegistration`|Allow `xcodebuild` to register your destination device on the developer portal if necessary. Requires a developer account to have been added in Xcode's Accounts preference pane. Defaults to `false`.|`true` or `false`|
|`appium:resultBundlePath`| Specify the path to the result bundle path as `xcodebuild` argument for `WebDriverAgent` build under a security flag (Please check _Opt-in Features_ section below). `WebDriverAgent` process must start/stop every time to pick up changed value of this property. Specifying `useNewWDA` to `true` may help there. Please read `man xcodebuild` for more details. | e.g. `/path/to/resultbundle` |
|`appium:resultBundleVersion`| Specify the version of result bundle as `xcodebuild` argument for `WebDriverAgent` build. The default value depends on your Xcode version. Please read `man xcodebuild` for more details. | e.g. `/path/to/resultbundle` |
Expand Down
2 changes: 1 addition & 1 deletion lib/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ class XCUITestDriver extends BaseDriver {
}

const wdaCaps = {
bundleId: this.opts.autoLaunch === false ? undefined : bundleId,
bundleId,
arguments: args,
environment: env,
eventloopIdleDelaySec: this.opts.wdaEventloopIdleDelay ?? 0,
Expand Down
1 change: 0 additions & 1 deletion test/functional/helpers/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ async function initWDA (caps) {
// easiest way to initialize WDA is to go through a test startup
// otherwise every change to the system would require a change here
const desiredCaps = Object.assign({
autoLaunch: false,
wdaLocalPort: WDA_PORT,
}, caps);
await driver.init(desiredCaps);
Expand Down
8 changes: 0 additions & 8 deletions test/functional/tv/tvos-e2e-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,7 @@ describe('tvOS', function () {
});

it('should launch com.apple.TVSettings', async function () {
baseCaps.autoLaunch = true;
const driver = await initSession(baseCaps);
(await driver.elementByAccessibilityId('General')).should.exist;
});

it('should launch com.apple.TVSettings with autoLaunch false', async function () {
baseCaps.autoLaunch = false;
const driver = await initSession(baseCaps);
await driver.execute('mobile: activateApp', {bundleId: 'com.apple.TVSettings'});
(await driver.elementByAccessibilityId('General')).should.exist;
});
});