Starting WebDriverAgent

Marek Cirkos edited this page May 11, 2017 · 4 revisions

WebDriverAgent can be started as any UITest bundle. We recommend using Xcode, xcodebuild or FBSimulatorControl. In order to start any UITest you need a test hosting application, which is used only to run test runner code and it should NOT be tested application. Xcode and xcodebuild will prepare test hosting application for you, however with FBSimulatorControl you need to use your own and point it explicitly or use system applications e.g. Safari.

After WebDriverAgentRunner is launched, you can get service URL from device logs (or Xcode console). Just search for line:


A: Using Xcode

Simply open WebDriverAgent.xcodeproj and start WebDriverAgentRunner test.

B: Using xcodebuild

xcodebuild -project WebDriverAgent.xcodeproj \
           -scheme WebDriverAgentRunner \
           -destination 'platform=iOS Simulator,name=iPhone 6' \

C: Using fbsimctl from FBSimulatorControl framework.

Build WebDriverAgent.xcodeproj and then:

./fbsimctl --state=booted \
           launch_xctest [path]/WebDriverAgentRunner.xctest --port 8100 -- \

D: Using FBSimulatorControl framework directly

Checkout FBSimulatorXCTestCommands.h and use sample in tests

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.