With the help of WebDriverAgent Appium will be able to run test on all real iOS devices parallely.
With minor changes in WebDriverAgent ie when we launch XCUI test WebDriverAgent runner use default port 8100 for each test we are running, which will throw error that agent is already running at localhost:8100. I did minor changes in WebDriverAgent source code which can generate random no of port within range of 8100 to 8200 and deployed to Appium directory and hit appium commands with udid of devices on different terminal. Bingo all appium nodes registered to Selenium Hub and i send multiple test with UDID of each device. All test started smoothly running on all iOS which includes iOS 10 too and earlier version.
You can get customised WebDriverAgent from here.
Mobile Device : iOS 10
XCODE version : 8
Steps to use this feature:
sudo chmod 777 /var/db/lockdown (from libimobiledevice/libimobiledevice#356
brew uninstall ios-webkit-debug-proxy (follow the instructions here :- https://github.com/google/ios-webkit-debug-proxy for building from source)
brew install --HEAD && brew install ios-webkit-debug-proxy
brew uninstall libimobiledevice && brew install --HEAD libimobiledevice
brew install usbmuxd
brew install carthage (WDA project uses this)
link: https://github.com/appium/appium-xcuitest-driver#usage – ensure deviceconsole is pulled down, compiled, and realDeviceLogger referenced in your appium capabilities
Clone WebDriverAgent from https://github.com/sugatmankar/WebDriverAgent and replace the one provided in the npm appium dependency
Get resolved common issue at https://github.com/facebook/WebDriverAgent/wiki/Common-Issues – ensure the provisioning profile or team is set on the WDA project to match your project
Make sure you can run (without errors):
- idevicepair pair (Hit ‘Trust’ on device)
- idevicepair validate
- ios_webkit_debug_proxy --debug (just make sure this runs without error then you can ctrl+c)
Modify appium capabilities to include:
- platformVersion: ‘10.0’
- automationName: ‘XCUITest’
- realDeviceLogger: (requires you to run make after pulling down deviceconsole repo)