在聚合物测试期间如何使用哪种硒和铬驱动程序



当我运行"聚合物测试 --skip-selenium-install"时,运行"无法建立新会话"时出现此错误

error: [cli.main]   Error: {"value":{"stacktrace":"org.openqa.selenium.SessionNotCreatedException: Cannot establish new sessionnBuild info: version: u00273.8.1u0027, revisi
on: u00276e95a6684bu0027, time: u00272017-12-01T19:05:32.194Zu0027nSystem info: host: u0027WDU8L0001186u0027, ip: u002710.244.11.110u0027, os.name: u0027Windows 7u0
027, os.arch: u0027x86u0027, os.version: u00276.1u0027, java.version: u00271.8.0_172u0027nDriver info: driver.version: unknownrntat org.openqa.selenium.remote.server
.ServicedSession$Factory.apply(ServicedSession.java:261)rntat org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$11(ActiveSessionFactory.java:167)rntat

e":"Cannot establish new sessionnBuild info: version: u00273.8.1u0027, revision: u00276e95a6684bu0027, time: u00272017-12-01T19:05:32.194Zu0027nSystem info: host: u00
27WDU8L0001186u0027, ip: u002710.244.11.110u0027, os.name: u0027Windows 7u0027, os.arch: u0027x86u0027, os.version: u00276.1u0027, java.version: u00271.8.0_172u0027
nDriver info: driver.version: unknown","error":"session not created"},"status":33}
at C:UsersD-CA69TOAppDataRoamingnpmnode_modulespolymer-clinode_modulesweb-component-testerrunnersteps.js:170:27
at Generator.next (<anonymous>)
at fulfilled (C:UsersD-CA69TOAppDataRoamingnpmnode_modulespolymer-clinode_modulesweb-component-testerrunnersteps.js:4:58)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)

通过谷歌搜索,我发现这可能是由Selenium,ChromeDriver和Chrome的错误组合引起的。好吧,我的Chrome版本是版本66.0.3359.117(官方版本((32位(,但是我如何检查哪个是Selenium和ChromeDriver?老实说,我不记得我安装了它们,所以我认为聚合物 cli 以某种方式为我做了这件事。

根据科里的建议编辑

C:>chromedriver -v
'chromedriver' is not recognized as an internal or external command,
operable program or batch file.

获取Chrome驱动程序版本:chromedriver -v

如果您安装了Selenium Python绑定,则可以使用以下方法检查版本:python -c "import selenium; print(selenium.__version__)"

例如,在外壳中,您可以执行以下操作:

$ chromedriver -v
ChromeDriver 2.36 (0)
$ python -c "import selenium; print(selenium.__version__)"
3.11.0

相关内容

  • 没有找到相关文章

最新更新