简体   繁体   English

在iPhone上运行Selenium脚本时出现空白页

[英]Blank page while running selenium scripts on Iphone

I have successfully build the iWebDriver on iphone 4s ( provisioning profiles are also installed ). 我已经在iphone 4s上成功构建了iWebDriver(还安装了配置文件)。

I am able to ping ip address of Phone ( which is displayed when WebDriver is started on phone at the bottom " http://XXX.XX.XX.XX/wd/hub " ) from my mac and also mac ip adress from iphone ( using ip scanning app ). 我可以从Mac ping Ping Phone的IP地址(当在底部“ http://XXX.XX.XX.XX/wd/hub ”的电话上启动WebDriver时显示),也可以从iphone ping IP地址(使用ip扫描应用程序)。

Now while running scripts from my mac, I am still seeing blank white screen in the phone ( when driver.get(URL) is executed ) with commands at the bottom of the blank screen ( setURL: ). 现在,从Mac运行脚本时,我仍然在电话中看到空白的白色屏幕(执行driver.get(URL)时),并且在空白屏幕的底部有命令(setURL:)。

I tried to open URL via iPhone Safari manually and it works fine. 我尝试通过iPhone Safari手动打开URL,并且工作正常。

WebDriver driver = new RemoteWebDriver(new URL("http://XXX.XX.XX.XX:3001/wd/hub"), 
DesiredCapabilities.iphone());
driver.get(URL);

Thanks 谢谢

I had the same issue. 我遇到过同样的问题。

Try 尝试

driver.navigate().to("www.bbc.co.uk"); 

Instead of 代替

driver.get();

Seemed to fix my issue. 似乎可以解决我的问题。

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

相关问题 使用JUnit Request Sampler与Jmeter运行Selenium脚本时出错 - Error while running Selenium Scripts with Jmeter using JUnit Request Sampler 运行 selenium 脚本时无法从弹出框中加载扩展 - Failed to load extension from popup box while running selenium scripts 使用JMeter运行Selenium脚本 - Running Selenium scripts with JMeter 运行Selenium时获取空指针异常-使用Pagefactory的TestNG脚本 - Getting Null Pointer Exception while running Selenium - TestNG Scripts using pagefactory 在Firefox量子浏览器上通过Selenium Webdriver运行脚本时无法单击Flash对象(版本:59.0.3) - Unable to click on Flash object, while running scripts through Selenium Webdriver on Firefox quantum browser(version:59.0.3) 带有 Selenium 的 ChromeDriver 显示一个空白页面 - ChromeDriver with Selenium displays a blank page 运行硒时出现NullPointerException - NullPointerException while running selenium 在远程计算机上运行 selenium 脚本(jar 文件) - Running selenium scripts( jar files) on remote computers Selenium网格打开没有URL的空白页面,而只有chrome运行测试 - Selenium grid opens blank page with no URL while only chrome runs the tests Chrome浏览器在Selenium Webdriver中启动时显示空白页 - Chrome browser launches with blank page in Selenium webdriver
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM