简体   繁体   English

为什么升级 chome 和 chrome 驱动程序会阻止 Web 应用程序加载

[英]Why does upgrading chome and chrome driver stop web application from loading

Im Running E2E testing on a web application in Jenkins using a centos node with webdriver IO.我使用带有 webdriver IO 的 centos 节点在 Jenkins 中的 Web 应用程序上运行 E2E 测试。

Chrome:google-chrome-stable-96.0.4664.110-1.x86_64.rpm Chrome driver: Chrome:google-chrome-stable-96.0.4664.110-1.x86_64.rpm Chrome 驱动程序:

sh 'sudo yum info google-chrome-stable | grep Version > chromeOutFile'
                    def CHROME_VERSION = readFile('chromeOutFile')
                    def Version = CHROME_VERSION.split('Version     :')
                    def VersionNumber = Version[1].trim()
                    sh "./src/main/web/node_modules/protractor/bin/webdriver-manager update --versions.chrome=${VersionNumber}"

Id like to update this to user the latest version of chrome with a corresponding chrome driver.我想更新这个给用户最新版本的 chrome 和相应的 chrome 驱动程序。

Webdriver IO config: Webdriver IO 配置:

services: [['chromedriver', {
        chromedriverCustomPath: '../node_modules/webdriver-manager/selenium/chromedriver_96.0.4664.110'
    }]],

Problem: when I try to use a more upto date version, even if its chromedriver_97.0.4692.99, my web application no longer starts up in Jenkins.问题:当我尝试使用更新版本时,即使它是 chromedriver_97.0.4692.99,我的 Web 应用程序也不再在 Jenkins 中启动。 When I try to visit the url, the screen shot just shows a blank screen.当我尝试访问 url 时,屏幕截图只显示一个空白屏幕。 Im not sure the application is even loading.我不确定应用程序是否正在加载。

Why does it only work with 96 but not others?为什么它只适用于 96 而不是其他?

I tried to map the version of chrome with an appropriate version of chrome driver using https://chromedriver.storage.googleapis.com/LATEST_RELEASE_97.0.4692 but that still doesnt work for me.我尝试使用https://chromedriver.storage.googleapis.com/LATEST_RELEASE_97.0.4692将 chrome 版本与适当版本的 chrome 驱动程序映射,但这对我来说仍然不起作用。

Running tests:运行测试:

cd e2e && wdio run wdio.ci.conf.ts --suite access --logLevel=info

+ lsb_release -d
Description:    CentOS Linux release 7.9.2009 (Core)

Thanks谢谢

Have you tried to check memory limits?您是否尝试检查内存限制? I had a similar problem with automated testing and had to change memory limits to either 1) limit chrome's memory or 2) pre allocate a set amount of memory ahead of time from my webserver if you are testing on the same device.我在自动测试中遇到了类似的问题,必须将内存限制更改为 1) 限制 chrome 的内存或 2) 如果您在同一台设备上进行测试,请提前从我的网络服务器预分配一定数量的内存。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在无头模式下使用Selenium chrome驱动程序是否必须安装chrome? - Does chrome have to be installed to use Selenium chrome driver in headless mode? -D 在 -Dwebdriver.chrome.driver 中是什么意思 - what does -D means in -Dwebdriver.chrome.driver Jenkins上的Chrome驱动程序异常 - Chrome driver exception on Jenkins Jenkins不使用Chrome浏览器执行Selenium Web驱动程序代码,但是如果用户通过Eclipse运行,则可以正常运行 - Jenkins not executing selenium web driver code with chrome browser whereas its working well if user run through Eclipse 将Chrome Selenium驱动程序添加到Ubuntu - Adding Chrome Selenium Driver to Ubuntu 如何在 jenkins 上启动 web 驱动程序时修复错误“加载共享库时:libglib-2.0.so.0” - How can I fix error "while loading shared libraries: libglib-2.0.so.0" when starting web driver on jenkins 将Jenkins与Selenium Web驱动程序集成 - Integrate jenkins with selenium web driver 为什么我的Web Start应用程序找不到现有文件? - Why doesn't my web start application finds existing files? 无法让Chrome驱动程序通过詹金斯工作 - Unable to get chrome driver working through jenkins Chrome驱动程序在执行时间歇性挂起 - Chrome Driver Hangs intermittently while execution
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM