Skip to content

Commit

Permalink
docs: update preinstalled and prebuilt wda methods (appium#2367)
Browse files Browse the repository at this point in the history
* docs: update preinstalled and prebuilt wda methods

* docs: modify a few

* docs: modify a few
  • Loading branch information
KazuCocoa authored Mar 27, 2024
1 parent 1736213 commit ba54e38
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
13 changes: 12 additions & 1 deletion docs/guides/run-prebuilt-wda.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ xcodebuild test-without-building \
provided `.xctestrun` file. Once this is done, `http://localhost:8100` will be able to receive
commands for the target device.
## Capabilities for Prebuilt WDA
## Capabilities for Prebuilt WDA with `appium:useXctestrunFile`
The XCUITest driver provides two capabilities that allow skipping the `build-for-testing` command,
and executing only the `test-without-building` command: __`appium:useXctestrunFile`__ and
Expand Down Expand Up @@ -89,6 +89,12 @@ The same thing can be achieved with the `appium:derivedDataPath` and `appium:use
capabilities, but this may fail if `xcodebuild` cannot find or handle the `.xctestrun` file
properly. The stability depends on Xcode.

## Capabilities for Prebuilt WDA with `appium:prebuiltWDAPath`

[Run Preinstalled WebDriverAgentRunner](./run-prebuilt-wda.md) provides `appium:prebuiltWDAPath` capability.
It also achieves the same thing, but the `appium:prebuiltWDAPath` does not use `xcodebuild`.
Please check the link for more details.

## Download Prebuilt WDA

[The Appium WebDriverAgent GitHub page](https://github.com/appium/WebDriverAgent/releases) provides
Expand All @@ -97,3 +103,8 @@ downloads for WebDriverAgent packages for real devices. They do not have embedde
The [Release](https://github.com/appium/appium-xcuitest-driver/actions/workflows/publish.js.yml) and
[Building WebDriverAgent](https://github.com/appium/WebDriverAgent/actions/workflows/wda-package.yml)
workflows may help with validating the build script.

For simulator environment, the prebuilt packages available on [Building WebDriverAgent](https://github.com/appium/WebDriverAgent/actions/workflows/wda-package.yml)
may not work for all environment as different building environment.
We recommend preparing the `Build` directory, which is generated by `-derivedDataPath` `xcodebuild` argument,
on your test running environment and re-use it.
11 changes: 6 additions & 5 deletions docs/guides/run-preinstalled-wda.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Run Preinstalled WebDriverAgentRunner
---

The XCUITest driver can be configured to launch an already-installed `WebDriverAgentRunner-Runner`
application (WDA) on a real device. This allows you to start a session without the `xcodebuild`
application (WDA) on a real device and a simulator. This allows you to start a session without the `xcodebuild`
command execution, improving the session startup performance.

!!! warning
Expand Down Expand Up @@ -120,10 +120,11 @@ the session will launch the WebDriverAgent process without `xcodebuild`.

## Set `appium:prebuiltWDAPath`

If the `appium:prebuiltWDAPath` capability is provided with a properly signed
`WebDriverAgentRunner-Runner.app` test bundle, the XCUITest driver will install the application and
launch it every test session. Test bundles cannot be versioned using `CFBundleVersion` as vanilla
applications do, which is why it is necessary to (re)install them for every test session.
If the `appium:prebuiltWDAPath` capability is provided with a `WebDriverAgentRunner-Runner.app` test bundle,
the XCUITest driver will install the application and launch it every test session.
Test bundles cannot be versioned using `CFBundleVersion` as vanilla applications do usually,
which is why it is necessary to (re)install them for every test session.
The test bundle should be signed properly for real devices.

Usually you can find the WDA application bundle at the below location if you use Xcode to build it.

Expand Down

0 comments on commit ba54e38

Please # to comment.