由于 chrome 驱动程序与 chrome 的版本不匹配,angular 中的 E2e 测试用例不是 运行
E2e testcase in angular not running due to version mismatch of chromedriver with chrome
我的angular版本是7,量角器版本是5.4.4,Os是ubuntu。当我尝试 运行 来自命令 ng e2e
的 e2e 测试用例时,出现以下错误。
[11:19:32] E/launcher - session not created: This version of ChromeDriver only supports Chrome version 88
Current browser version is 87.0.4280.141 with binary path /usr/bin/google-chrome
(Driver info: chromedriver=88.0.4324.96 (68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}),platform=Linux 5.0.0-37-generic x86_64)
[11:19:32] E/launcher - SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 88
Current browser version is 87.0.4280.141 with binary path /usr/bin/google-chrome
(Driver info: chromedriver=88.0.4324.96 (68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}),platform=Linux 5.0.0-37-generic x86_64)
收到此错误后,我尝试通过此命令更改 angular 项目中 chrome 驱动程序的降级版本 sudo webdriver-manager update --versions.chrome 87.0.4280.88
但同样的错误再次发生。
我能够解决问题,步骤如下:
使用此命令添加 chrome 驱动程序版本 87.0.4280.88 node node_modules/.bin/webdriver-manager update --versions.chrome=87.0.4280.88
添加chromeDriver: '../node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_87.0.4280.88', in protractor.conf.js
我的angular版本是7,量角器版本是5.4.4,Os是ubuntu。当我尝试 运行 来自命令 ng e2e
的 e2e 测试用例时,出现以下错误。
[11:19:32] E/launcher - session not created: This version of ChromeDriver only supports Chrome version 88 Current browser version is 87.0.4280.141 with binary path /usr/bin/google-chrome (Driver info: chromedriver=88.0.4324.96 (68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}),platform=Linux 5.0.0-37-generic x86_64) [11:19:32] E/launcher - SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 88 Current browser version is 87.0.4280.141 with binary path /usr/bin/google-chrome (Driver info: chromedriver=88.0.4324.96 (68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}),platform=Linux 5.0.0-37-generic x86_64)
收到此错误后,我尝试通过此命令更改 angular 项目中 chrome 驱动程序的降级版本 sudo webdriver-manager update --versions.chrome 87.0.4280.88
但同样的错误再次发生。
我能够解决问题,步骤如下:
使用此命令添加 chrome 驱动程序版本 87.0.4280.88
node node_modules/.bin/webdriver-manager update --versions.chrome=87.0.4280.88
添加
chromeDriver: '../node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_87.0.4280.88', in protractor.conf.js