Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP
A WebDriver server for iOS that runs inside the Simulator.
Objective-C C Other
Branch: master

README.md

WebDriverAgent

WebDriverAgent is a WebDriver server for iOS that runs inside the Simulator and is written entirely in Objective-C.

Building

Our dependencies are tracked with CocoaPods. First run

pod install

and then open WebDriverAgent.xcworkspace.

Running

To add new commands or just fool around with WebDriverAgent, you can run it from within Xcode. Because WebDriverAgent is a daemon, you will not notice any UI when it runs. Hit the /tree endpoint to confirm it's running.

In practice, you would want to start it up alongside your application. You can use Apple's simctl tool for this or FBSimulatorControl. This is how you might do it with simctl:

# 1. Open the Simulator and application you wish to test.

# 2. Determine the UDID of the Simulator.
xcrun simctl list | grep Booted

# 3. Start WebDriverAgent.
xcrun simctl spawn <Device_UDID> <WebDriverAgent_path>
# e.g. xcrun simctl spawn 787CA858-1A7D-43CE-BE36-F040CB9AF6E3 /Users/mehdi/src/WebDriverAgent/Build/Products/Debug-iphonesimulator/WebDriverAgent.app/WebDriverAgent

How it works

WebDriverAgent works under-the-hood by linking to UIAutomation.framework and calling the same APIs that are exposed through Apple's UIAutomation.js framework.

Because it is not tied to an Instruments run, it is able to run across applications or even on the home screen. Furthermore, it's much faster than any JavaScript UIAutomation.js driver as it runs a native HTTP server and does not need to ferry commands and results through a makeshift run loop.

Contributing

See the CONTRIBUTING file for how to help out.

License

WebDriverAgent is BSD-licensed. We also provide an additional patent grant.

Something went wrong with that request. Please try again.