git clone https://github.com/ios-driver/ios-driver.git cd ios-driver/ git submodule init git submodule update mvn package -DskipTests cp server/target/ios-server-standalone-0.6.6-SNAPSHOT-e1bb7351e221c753ae72895cbd509337ace395a5-jar-with-dependencies.jar ~/Downloads/ios-driver/ios-server-standalone-0.6.6-SNAPSHOT.jar
proto si vytvoříme vlastní třídu:
import ...; public class SwipeableWebDriver extends RemoteWebDriver implements HasTouchScreen { private RemoteTouchScreen touch; public SwipeableWebDriver(URL remoteAddress, Capabilities desiredCapabilities) { super(remoteAddress, desiredCapabilities); touch = new RemoteTouchScreen(getExecuteMethod()); } public TouchScreen getTouch() { return touch; } }
a poté inicializujeme jako:
RemoteWebDriver driver = new SwipeableWebDriver(new URL("http://lokalhost:4444/wd/hub"), capabilities);
cap.setCapability(IOSCapabilities.SHOW_KEYBOARD_AFTER_CLICK_AND_TYPE, true);