为何我看的如此眼熟。。
@sunlight_award 按照官网上的教程就可以了
public class Demo {
public static void main(String[] args) throws MalformedURLException{
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "4.1.2");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Selendroid");
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "Chrome");
URL url = new URL("http://127.0.0.1:4723/wd/hub");
RemoteWebDriver driver = new RemoteWebDriver(url, capabilities);
}
}