简体   繁体   English

通过Wifi实现Appium iOS自动化

[英]Appium iOS automation via Wifi

I'm working on an automation project for iOS, and I've been googling on if it's possible to run automation tests with appium through the Wifi on a real device without having the device plugged in into the pc. 我正在研究iOS的自动化项目,如果可以在真实设备上通过Wifi运行appium,而不必将设备插入电脑,我一直在谷歌上搜索。 In my understanding, I think it's not possible and googling it haven't seen any one say other wise (May I'm just googling it wrong). 在我的理解中,我认为这是不可能的,谷歌搜索没有看到任何人说其他明智(我可能只是谷歌搜索错误)。 Has anyone had to do automation on iOS device via wifi?. 有没有人必须通过wifi在iOS设备上进行自动化? The AUT is a hybrid app. AUT是一个混合应用程序。

You can execute test on iphone browser (webview) by using selenium's iphoneDriver not by appium, follow this: 您可以使用selenium的iphoneDriver而不是appium在iphone浏览器(webview)上执行测试,请按照下列步骤操作:

  1. Get iwebdriver code by executing this on terminal: svn checkout http://selenium.googlecode.com/svn/trunk/ and Install iwebdriver in iPhone using xcode and start it in device, once you start this, there will a url displayed at the bottom of app in iPhone, use it in below code at iphoneIp = http://ip ; 通过在终端上执行以下操作来获取iwebdriver代码:svn checkout http://selenium.googlecode.com/svn/trunk/并使用xcode在iPhone中安装iwebdriver并在设备中启动它,一旦启动,URL将会显示在iPhone底部的应用程序,请在iphoneIp = http:// ip的以下代码中使用它;

  2. initialise remote driver in your test. 在测试中初始化远程驱动程序。 RemoteWebDriver iphoneDriver = new RemoteWebDriver(new URL(iphoneIp), cap); RemoteWebDriver iphoneDriver =新的RemoteWebDriver(新的URL(iphoneIp),上限);

  3. Then write your test as usual. 然后像往常一样编写测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM