[Appium][iOS] Handle iOS apps via Appium over the network

From Appium 1.13.0, wdaBaseUrl has been introduced.

The capability allows us to configure the URL of communication channel between xcuitest-driver which is running on the host machine and WDA which is running on the test device.

Once the capability is provided like below, Appium build WDA as xcodebuild and install it to the device over the network. (Make sure connect via network has been checked.) After installing the WDA, Appium tries to communicate with the WDA via the wdaBaseUrl over the network. In the below case, YouTube app installed on the device launches after the process.

platformName: 'ios',
automationName: 'xcuitest',
udid: 'auto',
platformVersion: '12.3.1',
bundleId: 'com.google.ios.youtube',
deviceName: 'iPhone',
wdaBaseUrl: 'http://192.168.1.103', # local network
wdaLocalPort: 8100

It works if the test app is in the device. The deference of wdaBaseUrl and non it is below. After the xcodebuild, Appium waits till the WDA starts with asking /status command to the test device. Then, Appium asks to wdaBaseUrl like http://192.168.1.103 instead of http://localhost if it was provided.

[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://192.168.1.103:8100/status] with no body

Appium (1.14.0-) depends on ios-deploy to install ipa into devices. It does not support installing the ipa over the network. So, app capability cannot work.

webDriverAgentUrl also can do the same thing, but it does not conduct xcodebuiild. It means WDA must be running on the device before Appium create session process. This should be also very handy to handle WDA over the network.

https://github.com/appium/appium-xcuitest-driver

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.