Java examples for Testing:Appium
Create appium IOSDriver
package com.augusta.universe; import java.net.MalformedURLException; import java.net.URL; import java.util.concurrent.TimeUnit; import org.openqa.selenium.remote.DesiredCapabilities; import io.appium.java_client.ios.IOSDriver; import io.appium.java_client.remote.MobileCapabilityType; import io.appium.java_client.remote.MobilePlatform; public class IOSSteppersTest { public static void main(String[] args) throws MalformedURLException, InterruptedException { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "Appium"); capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.IOS);/*from w ww .j ava2 s . c o m*/ capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "9.1"); capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Augusta's iPhone6s plus"); // capabilities.setCapability("udid", "5a127959bdd1b42e47a408b9128ac47fabee698e"); capabilities.setCapability("app", "com.augusta.universe"); IOSDriver driver = new IOSDriver(new URL( "http://0.0.0.0:4723/wd/hub"), capabilities); driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); } }