我有自己的硒网格和不同的窗口机器。其中之一是Windows 10机器。Chrome和Firefox可以工作,但我不能让Edge运行。
我的例外是:
geb.driver.DriverCreationException: failed to create driver from callback 'script1460298173607577952326$_run_closure3@6256ac4f'
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机器上安装了Microsoft WebDriver。
我的gebconfig.groovy代码
driver = {
DesiredCapabilities capabilities = DesiredCapabilities.edge()
capabilities.setPlatform(Platform.WIN10)
new RemoteWebDriver(
new URL("http://localhost:4444/wd/hub"), capabilities
)
}我遗漏了什么?
发布于 2016-04-13 07:14:07
我找到了解决办法。
在windows机器上,我必须在启动节点时添加以下参数: Dwebdriver.edge.driver="C:/selenium/MicrosoftWebDriver.exe“-browser browserName="MicrosoftEdge",platform=WIN10
发布于 2016-04-11 07:32:41
彼得
Error forwarding the new session cannot find : Capabilities [{platform=WIN10, browserName=MicrosoftEdge, version=}]网格告诉您,它没有发现任何具有"MicrosoftEdge“浏览器并将其平台设置为"WIN10”的节点。
您需要回过头来,再看看您是如何生成节点的,看看它是否需要稍微调整一下。
要全面了解如何设置网格,您可能可以查看我的这博客文章。
https://stackoverflow.com/questions/36531005
复制相似问题