简体   繁体   English

Selenium网格到远程Webdriver(chrome)挂起

[英]Selenium grid to remote webdriver(chrome) hangs on get

I have a selenium grid with nodes on virtual machine. 我有一个硒网格,其中虚拟机上有节点。 I can connect, open browser and close it but when i try navigating to a page it hangs on Executing: [get: http://google.com] 我可以连接,打开浏览器并关闭它,但是当我尝试导航到页面时,它会挂在执行中:[get: http : //google.com]

I use the latest verions of selenium, chromedriver and java. 我使用硒,chromedriver和java的最新版本。

Declaration: 宣言:

DesiredCapabilities capabilities =  DesiredCapabilities.Chrome();
        driver = new RemoteWebDriver(new Uri(@"http://xxx.xx.xx.xxx:6000/wd/hub"), capabilities);

then i try to use it when i click a button on my win form: 然后,当我单击获胜表格上的按钮时,我会尝试使用它:

 driver.Navigate().GoToUrl("http://www.google.com");

I can see the node gets the command and logs Executing:[get:htttp://www.google.com] but just hangs. 我可以看到该节点获取了命令并记录了Executing:[get:htttp://www.google.com],但只是挂起了。 Url doesn't change in browser(its "data:," all the time ) 网址在浏览器中不会更改(它的“ data:”一直都在)

I use windows 7 x64 and try to control browser on windows 7 x32. 我使用Windows 7 x64,并尝试在Windows 7 x32上控制浏览器。 (if i connect to node on my pc the code works fine) (如果我连接到我的电脑上的节点,代码可以正常工作)

Any ideas? 有任何想法吗?

Thanks! 谢谢!

I am seeing the exact issue with Safari (python). 我看到了Safari(python)的确切问题。 I am using selenium standalone server v2.47.1. 我正在使用硒独立服务器v2.47.1。 My current workaround is to use JS: 我当前的解决方法是使用JS:

"driver.execute_script("window.location.href = '{0}';".format(url))"

I also observed that if you don't set a homepage on Safari or have it default to load the homepage on new tab/window, the webdriver acts up and hangs on 'get' method. 我还观察到,如果您未在Safari上设置主页或将其默认设置为在新标签页/窗口中加载主页,则webdriver会起作用并挂起“ get”方法。

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

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