我能看到FF [53.0.2]打开了。但是,我得到一个"错误无法创建新的远程会话"。任何人都可以帮忙吗?
环境: Windows 7 64位 FF - 53.0.2(32位) 硒3.4 Geckdriver 0.16和0.16.1 [win 32]
问题: 无法创建新的远程会话。但是,驱动程序启动了FF [空白浏览器]。
System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir")+"\\src\\Drivers\\geckodriver-v0.16.0-win32\\geckodriver.exe");
DesiredCapabilities caps2 = DesiredCapabilities.firefox();
caps2.setBrowserName("firefox");
caps2.setPlatform(org.openqa.selenium.Platform.WINDOWS);
driver1= new RemoteWebDriver(new URL(node),caps2);
实际输出:
org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, browserName=firefox, moz:firefoxOptions={binary=Optional.empty, args=[], legacy=null, logLevel=null, prefs={}, profile=null}, version=, platform=VISTA}], required capabilities = Capabilities [{moz:firefoxOptions={binary=Optional.empty, args=[], legacy=null, logLevel=null, prefs={}, profile=null}}]
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'XXXXXXXXX', ip: 'XXX.XXX.XX.XXX', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_65'
Driver info: driver.version: FirefoxDriver
Build info: version: 'unknown', revision: '5234b32', time: '2017-03-10 09:00:17 -0800'
System info: host: 'XXXXXXXXX', ip: 'XXX.XXX.XX.XXX', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_65'
Driver info: driver.version: FirefoxDriver
答案 0 :(得分:0)
你为什么不试着替换这个
System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir")+"\\src\\Drivers\\geckodriver-v0.16.0-win32\\geckodriver.exe");
有了这个:
System.setProperty("webdriver.gecko.driver", "explicit path to your geckodriver);
答案 1 :(得分:0)
我解决了这个问题。在设置节点时,我将配置命名为geckodriver-v0.16.1-win32。无论设置其他属性,它都没有变化。简单一个,但我花了很长时间才探索。无论如何,谢谢你们。