import java.io.File;
//import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
//import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import io.appium.java_client.ios.IOSDriver;
public class testone{
public static IOSDriver driver;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
File appDir = new File ("//Users//gangaiahl//Appium//jars//CarsGuideApp//Payload");
File app = new File (appDir,"Car.app");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("browserName", "");
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("deviceName", "Car_iPhone_6");
capabilities.setCapability("platformVersion", "9.2.1");
capabilities.setCapability("device", "iPhone 6");
//capabilities.setCapability("deviceName", "iPad 2");
//capabilities.setCapability("platformVersion", "8.4");
//capabilities.setCapability("device", "iPad");
capabilities.setCapability("app",app.getAbsolutePath());
capabilities.setCapability("u_did", "840384833537f40d011032eaaf20a53705a451ce");
//capabilities.setCapability("u_did", "5446DE10-D8D1-4346-B8C7-E4C16053FE3A");
//840384833537f40d011032eaaf20a53705a451ce
capabilities.setCapability("bundle_id", "au.dev.com.onewaytraffic.carsguide");
driver = new IOSDriver (new URL(" http://127.0.0.1:4723/wd/hub "),capabilities);
}
@Test
public void test() {
System.out.println("Hello");
// fail("Not yet implemented");
}
}
请参阅随附的屏幕截图和屏幕截图中的错误。谁能帮我?我在 Mac 10.10.5 版本和自动化 iOS 移动应用程序上使用 Appium