当前位置: 首页 > 知识库问答 >
问题:

量角器-会话未创建异常

巴帅
2023-03-14

当我试图对chrome运行量角器测试时,我得到以下错误。

会话未创建异常:Chrome版本必须是

[11:42:23] E/launcher - session not created exception: Chrome version must be >= 59.0.3071.0 (Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide
any stacktrace information) Command duration or timeout: 6.44 seconds Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z' System info: host: 'PC328569', ip: '10.25.227.179', os.name: 'Windows 7', os.arch: 'amd64', os.version:
'6.1', java.version: '1.8.0_121' Driver info: driver.version: unknown [11:42:23] E/launcher - SessionNotCreatedError: session not created exception: Chrome version must be >= 59.0.3071.0 (Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows
NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 6.44 seconds Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z' System info: host: 'PC328569', ip:
'10.25.227.179', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121' Driver info: driver.version: unknown at WebDriverError (D:\Balachander\DailyScript\node_modules\selenium-webdriver\lib\error.js:27:5) at SessionNotCreatedError
(D:\Balachander\DailyScript\node_modules\selenium-webdriver\lib\error.js:214:5) at Object.checkLegacyResponse (D:\Balachander\DailyScript\node_modules\selenium-webdriver\lib\error.js:505:15) at parseHttpResponse (D:\Balachander\DailyScript\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (D:\Balachander\DailyScript\node_modules\selenium-webdriver\lib\http.js:440:13) at process._tickCallback (internal/process/next_tick.js:103:7) From: Task: WebDriver.createSession() at Function.createSession (D:\Balachander\DailyScript\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
at Function.createSession (D:\Balachander\DailyScript\node_modules\selenium-webdriver\chrome.js:709:29) at createDriver (D:\Balachander\DailyScript\node_modules\selenium-webdriver\index.js:167:33) at Builder.build (D:\Balachander\DailyScript\node_modules\selenium-webdriver\index.js:623:16)
at Hosted.getNewDriver (D:\Balachander\DailyScript\node_modules\protractor\lib\driverProviders\driverProvider.ts:60:29) at Runner.createBrowser (D:\Balachander\DailyScript\node_modules\protractor\lib\runner.ts:225:39) at q.then.then (D:\Balachander\DailyScript\node_modules\protractor\lib\runner.ts:391:27)
at _fulfilled (D:\Balachander\DailyScript\node_modules\q\q.js:834:54) at self.promiseDispatch.done (D:\Balachander\DailyScript\node_modules\q\q.js:863:30) at Promise.promise.promiseDispatch (D:\Balachander\DailyScript\node_modules\q\q.js:796:13) [11:42:23]
E/launcher - Process exited with error code 199

使用的可执行文件版本:webdriver manager-12.0.6量角器-5.1.2 chrome驱动程序-2.32 Java-1.8

我尝试过的:1.将网络驱动程序更新到最新版本npm更新-g量角器网络驱动程序-管理器更新

2.编辑量角器的配置文件:node_modules/protractor/config.json将chrome驱动程序版本更改为您需要的任何版本。例如“chrome驱动程序”:“2.24”。运行webdriver-Manager更新。但出于某种原因,webdriver-Manager总是使用chrome驱动程序2.32。

感谢任何帮助或建议。谢谢。


共有1个答案

孟英叡
2023-03-14

根据以下参考资料,您需要更新实际安装的chrome。

更新浏览器:-关于谷歌浏览器

菜单-

参考:-

https://github.com/appveyor/ci/issues/1600

Chromedriver error“Chrome版本必须

希望对你有帮助:)

 类似资料:
  • org.openqa.selenium.SessionNotCreatedException:无法创建新会话。(原始错误:命令失败:C:\Windows\system32\cmd.exe/s/C“C:\Program Files(x86)\Android\Android sdk\platform tools\adb.exe”-s 69c7aa170104安装“C:\Program Files(x8

  • 在执行java代码期间执行时,会引发以下错误: 线程“main”组织中出现异常。openqa。硒。SessionNotCreateDexException:尝试在不建立连接的情况下运行命令生成信息:版本:'3.6.0',修订版:'6fbf3ec767',时间:'2017-09-27T16:15:26.402Z'系统信息:主机:'ADMIN-PC',ip:'192.168.1.6',操作系统。名称:

  • 直到昨天:以下代码工作正常。 但是今天早上它开始抛出:异常线程"main"org.openqa.selenium.SessionNotCreatedException:会话未创建异常 我在Stackoverflow中阅读了几个答案。我知道如果selenium web驱动程序和chrome驱动程序之间存在版本不匹配,就会引发此错误。所以我下载了最新的Selenium Web驱动程序(3.0.1 fo

  • 我已经研究了很多,并使用了各种论坛中提到的许多可能的解决方案,没有一个对我有效。我正在尝试在CI/CD管道中运行此功能,虽然能够在本地运行量角器测试用例,并且能够启动浏览器,但在CI/CD管道构建中失败,以下是详细信息 我在包中的脚本下使用以下postinstall。json 对于上面的脚本命令,下面的错误被抛出I/file_manager-创建文件夹D:\a\1\s\node_modules\量

  • 当会话仅是一个未来的且还没有被建立的会话时被认为是“新”的。因为 HTTP是一种基于请求-响应的协议,直到客户端“加入”到 HTTP 会话之前它都被认为是新的。当会话跟踪信息返回到服务器指示会话已经建立时客户端加入到会话。直到客户端加入到会话,否则不能假定下一个来自客户端的请求被识别为同一会话。 如果以下之一是 true,会话被认为是“新”的: 客户端还不知道会话 客户端选择不加入会话。 这些条件

  • 我试图使用Spring Cloud的Zuul、Eureka和我自己的服务实现微服务架构。我有多个具有UI和服务的服务,每个服务都可以使用x509安全性对用户进行身份验证。现在我想把祖尔放在那些服务机构的前面。由于Zuul无法将客户端证书转发到后端,我认为下一个最好的方法是在Zuul的前门对用户进行身份验证,然后使用Spring会话在后端服务中复制他们的身份验证状态。我遵循了Dave Syer的教程