无法使用Windows 10计算机在iOS真实设备上运行appium测试
问题描述:
我想在已插入Windows 10计算机的iPhone 5S上运行我的appium测试。但它不工作。有人可以帮助我如何使用Windows PC在iOS真实设备上运行appium测试吗?以下是我用过的所需功能。无法使用Windows 10计算机在iOS真实设备上运行appium测试
public class WebTest {
AppiumDriver driver;
DesiredCapabilities capabilities = new DesiredCapabilities();
@BeforeClass()
public void init() throws MalformedURLException {
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("deviceName", "iPhone 5s");
capabilities.setCapability("browser", "safari");
driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"),
capabilities);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
@Test
public void googleTest() {
driver.get("http://www.google.com");
}
}
答
据我所知,在Windows上自动化iOS设备是不可能的,因为XCode不适用于Windows。 您可以尝试使用MacOS运行虚拟机并从那里运行自动化测试。 有this site它允许您从Windows机器远程设备自动化(可能支付)。