Java 怎么创建Appium iosDriver

2019年7月29日19:55:44Java 怎么创建Appium iosDriver已关闭评论 582 1119字阅读3分43秒

1.简介

Java 怎么创建Appium iosDriver?——请看下文。

2.示例代码

/**
 * 版权所有 编程十万个怎么办(www.tah1986.com)
 */
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);
        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:
        driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);

    }
}

 
继续阅读
编程十万个怎么办