2016-04-10 126 views
0

我有我自己的Selenium网格与不同的Windows机器。其中之一是Windows 10机器。 Chrome和Firefox的作​​品,但我不能让Edge运行。Selenium RemoteWebdriver边缘不起作用

我的例外:

geb.driver.DriverCreationException: failed to create driver from callback '[email protected]' 
at geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35) 
at geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:85) 
at geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy) 
at geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:32) 
at geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:84) 
at geb.Configuration.createDriver(Configuration.groovy:382) 
at geb.Configuration.getDriver(Configuration.groovy:371) 
at geb.Browser.getDriver(Browser.groovy:108) 
at geb.spock.GebSpec.propertyMissing(GebSpec.groovy:60) 
at specs.LomnidoBaseSpec.setupSpec(LomnidoBaseSpec.groovy:28) 
Caused by: org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find : Capabilities [{platform=WIN10, browserName=MicrosoftEdge, version=}] 
Command duration or timeout: 382 milliseconds 
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' 
System info: host: 'peter-laptop', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-85-generic', java.version: '1.8.0_45' 

我已经在Windows机器上安装了微软的webdriver。

我在gebconfig.groovy代码

driver = { 
     DesiredCapabilities capabilities = DesiredCapabilities.edge() 
     capabilities.setPlatform(Platform.WIN10) 
     new RemoteWebDriver(     
       new URL("http://localhost:4444/wd/hub"), capabilities 
     ) 
    } 

我缺少什么?

回答

2

我找到了解决方案。

在Windows机器上,我必须对我的节点启动添加以下参数: Dwebdriver.edge.driver = “C:/selenium/MicrosoftWebDriver.exe” -browser browserName = “MicrosoftEdge”,平台= WIN10

0

彼得

Error forwarding the new session cannot find : Capabilities [{platform=WIN10, browserName=MicrosoftEdge, version=}] 

是告诉你,它没有发现,正处于一个名为“MicrosoftEdge”以其平台设置为“WIN10”浏览器的任何节点的网格的方式。

你需要回头再看看你是如何产生你的节点,看看它是否需要调整一下。

要了解如何设置网格的一般概述,您可以查看我的this博客文章。

+0

嗨,谢谢你的回答,但你的博客并没有帮助解决我的问题。我已经完成了将边缘添加到节点的所有描述,但边缘浏览器未注册到我的集线器 – Peter

+0

我需要阅读该博客文章。我试图在grails项目中使用selenium独立服务器,并且它在生产中失败。从IntelliJ工作,希望这可以解决我的问题。 – Sulteric