【发布时间】:2017-04-25 12:16:10
【问题描述】:
我在物理机(Windows 10,RAM 16Gb,x64)上启动了一个集线器:
java -jar selenium-server-standalone-2.53.0.jar -role hub port 4444
我还在虚拟机上注册了一个 节点(我使用 VirtualBox:Linux,Ubuntu 16.04.2;i386。基本内存:2048 Mb):
java -jar selenium-server-standalone-2.53.0.jar -role webdriver port 9999 -hub @987654321@
IDE 中的配置:WebDriver driver = new RemoteWebDriver(new URL("@987654323@"), capabilities);
运行测试时出错:
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to 10.0.2.15:9999 [/10.0.2.15] failed: Connection timed out: connect
物理机地址:172.xx.xxx.248
虚拟机地址:10.0.2.15
【问题讨论】:
-
您可以登录虚拟机并手动启动浏览器吗?
-
是的,我可以在虚拟 Linux 机器上的 /usr/bin 目录中手动启动 firefox
标签: selenium grid virtual-machine virtualbox nodes