This repository has been archived by the owner on Dec 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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:
ServerURLHere->http://[SOME_IP]:8100<-ServerURLHere
Simply open WebDriverAgent.xcodeproj
and start WebDriverAgentRunner
test.
xcodebuild -project WebDriverAgent.xcodeproj \
-scheme WebDriverAgentRunner \
-destination 'platform=iOS Simulator,name=iPhone 6' \
test
C: Using fbsimctl from FBSimulatorControl framework.
Build WebDriverAgent.xcodeproj and then:
./fbsimctl --state=booted \
launch_xctest [path]/WebDriverAgentRunner.xctest com.apple.mobilesafari --port 8100 -- \
listen
D: Using FBSimulatorControl framework directly
Checkout FBSimulatorXCTestCommands.h and use sample in tests