无法使用appium xcuitest

时间:2016-11-10 11:37:20

标签: selenium appium appium-ios

我正在使用appium xcuitest v1.6在iOS模拟器v10.0中自动化wb应用程序,但是我无法使用代码中提到的url启动safari。获得以下例外情况。请帮助。

线程“main”中的异常org.openqa.selenium.remote.UnreachableBrowserException:无法启动新会话。可能的原因是远程服务器的无效地址或浏览器启动失败。 构建信息:版本:'2.45.0',修订版:'5017cb8',时间:'2015-02-26 23:59:50' 系统信息:主机:'TVMATP310436M',ip:'192.168.1.116',os.name:'Mac OS X',os.arch:'x86_64',os.version:'10 .11.6',java.version:' 1.8.0_111' 驱动程序信息:driver.version:IOSDriver     在org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:593)     at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:51)     at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)     在io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)     在org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)     在org.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver.java:126)     在org.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver.java:139)     在io.appium.java_client.DefaultGenericMobileDriver。(DefaultGenericMobileDriver.java:47)     在io.appium.java_client.AppiumDriver。(AppiumDriver.java:114)     在io.appium.java_client.AppiumDriver。(AppiumDriver.java:132)     在io.appium.java_client.ios.IOSDriver。(IOSDriver.java:81)     在com.jcp.setup.SetUpAppium.main(SetUpAppium.java:29) 引起:org.openqa.selenium.WebDriverException:org.apache.http.NoHttpResponseException:0.0.0.0:4723无法响应 构建信息:版本:'2.45.0',修订版:'5017cb8',时间:'2015-02-26 23:59:50' 系统信息:主机:'TVMATP310436M',ip:'192.168.1.116',os.name:'Mac OS X',os.arch:'x86_64',os.version:'10 .11.6',java.version:' 1.8.0_111' 驱动程序信息:driver.version:IOSDriver     在io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:84)     在org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:572)     ......还有11个 引起:org.apache.http.NoHttpResponseException:0.0.0.0:4723无法响应     at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143)     at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)     在org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260)     at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:161)     在org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:153)     at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271)     在org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)     在org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:254)     在org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)     at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)     在org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)     在org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)     在org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)     在org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)     在org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:144)     在org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:72)     在org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:133)     在io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:69)     ......还有12个

1 个答案:

答案 0 :(得分:0)

我宁愿使用以下命令卸载并安装appium 1.6.4:

npm卸载appium npm install -g appium@1.6.4

与早期的appium版本相关的Safari存在问题。