Selenium:无法打开连接:转发新会话时出错.找不到Internet Explorer的功能



我正在尝试在Internet Explorer上运行Behat测试。

在我的Windows7虚拟机中,我启动

java -jar selenium-server-standalone-2.41.0.jar -role node -hub  
    http://myhostcomputer:4444/grid/register -browser browserName=ie 
    -Dwebdriver.ie.driver=IEDriverServer.exe

它成功启动并注册到我的Linux主机:

16:07:26.582 INFO - Started org.openqa.jetty.jetty.Server@104c47b5
16:07:26.598 INFO - using the json request : {"class":"org.openqa.grid.common.Re
gistrationRequest","capabilities":[{"seleniumProtocol":"WebDriver","platform":"V
ISTA","browserName":"ie"}],"configuration":{"port":5555,"register":true,"host":"
192.168.0.188","proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy","brow
ser":"browserName=ie","maxSession":5,"role":"node","hubHost":"x.orange.imi.local
","registerCycle":5000,"hub":"http://myhostcomputer:4444/grid/register","Dwe
bdriver.ie.driver=IEDriverServer.exe":"","hubPort":4444,"url":"http://192.168.0.
188:5555","remoteHost":"http://192.168.0.188:5555"}}
16:07:26.598 INFO - Starting auto register thread. Will try to register every 50
00 ms.
16:07:26.598 INFO - Registering the node to hub :http://x.orange.imi.local:4444/
grid/register

我在myhostcomputer上运行了java -jar selenium-server-standalone-2.41.0.jar -role hub。当节点连接时,我会收到消息:

org.openqa.grid.internal.BaseRemoteProxy <init>

当启动behat时,我得到

 Could not open connection: Error forwarding the new session cannot find :
     Capabilities [{platform=VISTA, browserVersion=11, ignoreZoomSetting=false, 
     browserName=ie, deviceType=pc, name=Behat Test, selenium-version=2.41.0, 
     browser=ie, deviceOrientation=portrait, version=11, max-duration=300}]

这里怎么了?我可以列出Selenium服务器中可用的功能吗?我已经尝试用iexplore替换所有ie

浏览器允许的参数为browserName={android,chrome,firefox,htmlunit,internetexplorer,iphone,opera}

所以将其更改为internet explorer

参考-https://github.com/SeleniumHQ/selenium/wiki/Grid2

确保您的功能对所有请求的功能使用相同的数据类型。

我看到了一个类似的问题,结果发现我的节点使用的是整数版本,我的代码要求使用数字的字符串表示。

将其中一个更改为与另一个匹配将解决问题。

即使用"version":11DesiredCapabilities.setCapability("version",11)或使用"version":"11"DesiredCapabilities.setVersion("11")

相关内容