我有一个角度计划,运行卡玛木偶,偶尔我会得到以下错误
[11:13:43] E/launcher - session not created: This version of ChromeDriver only supports Chrome version 93
Current browser version is 92.0.4515.107 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
(Driver info: chromedriver=93.0.4577.15 (660fc11082ba57405eca2e8c49c3e1af756fbfae-refs/branch-heads/4577@{#203}),platform=Windows NT 10.0.17763 x86_64)
[11:13:43] E/launcher - SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 93
Current browser version is 92.0.4515.107 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
(Driver info: chromedriver=93.0.4577.15 (660fc11082ba57405eca2e8c49c3e1af756fbfae-refs/branch-heads/4577@{#203}),platform=Windows NT 10.0.17763 x86_64)
at Object.checkLegacyResponse (D:\a\1\s\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (D:\a\1\s\node_modules\selenium-webdriver\lib\http.js:509:13)
at D:\a\1\s\node_modules\selenium-webdriver\lib\http.js:441:30
at processTicksAndRejections (node:internal/process/task_queues:96:5)
From: Task: WebDriver.createSession()
at Function.createSession (D:\a\1\s\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
at Function.createSession (D:\a\1\s\node_modules\selenium-webdriver\chrome.js:761:15)
at Direct.getNewDriver (D:\a\1\s\node_modules\protractor\built\driverProviders\direct.js:77:33)
at Runner.createBrowser (D:\a\1\s\node_modules\protractor\built\runner.js:195:43)
at D:\a\1\s\node_modules\protractor\built\runner.js:339:29
at _fulfilled (D:\a\1\s\node_modules\q\q.js:834:54)
at D:\a\1\s\node_modules\q\q.js:863:30
at Promise.promise.promiseDispatch (D:\a\1\s\node_modules\q\q.js:796:13)
at D:\a\1\s\node_modules\q\q.js:556:49
at runSingle (D:\a\1\s\node_modules\q\q.js:137:13)
[11:13:43] E/launcher - Process exited with error code 199似乎每次铬驱午餐时都会出现这种情况。
这是我的装置
E2e/protractor.conj.
module.exports = function (config) {
process.env.CHROME_BIN = require('puppeteer').executablePath();
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
...
],
...
browsers: ['ChromeHeadless'],
...
customLaunchers: {
headlessChrome: {
base: "ChromeHeadless",
flags: [
"--disable-dev-shm-usage",
"--disable-extensions",
"--disable-gpu",
"--disable-web-security",
"--headless",
"--js-flags=--max-old-space-size=8196",
"--no-proxy-server",
"--no-sandbox",
],
}
}
});
}; 我的问题是,是否有一个配置来避免每个新的铬驱版本的错误?
发布于 2021-09-06 15:32:17
是的,每次发布新版本时,您都需要下载并放入您的驱动程序路径或类似的位置,我不知道是否存在一个带有pip的命令,这样做就更容易了。Chrome驱动程序版本下载
https://stackoverflow.com/questions/68575267
复制相似问题