Selenium 4.1和Spring Boot Web驱动程序版本

发布于 2025-02-13 21:10:26 字数 370 浏览 1 评论 0原文

我试图将Gradle项目从Selenium 3迁移到Selenium 4
(实施'org.seleniumhq.selenium:selenium-java:4.1.1')
但是Chrome,Firefox和Edge Web驱动程序仍来自Selenium版本3 (org.seleniumhq.selenium:硒 - 铬驱动器:3.141.59)。 更新为4.1.1

如果我从项目中删除Spring Boot依赖性,它们将使用Gradle版本“ 7.3.3” 。
春季启动“ 2.6.3”。
春季依赖性管理“ 1.0.11.Release”。

为什么发生这种情况的任何想法,我希望依赖性地狱与Spring Boot的创建消失了),

谢谢!

I tried to migrate gradle project with spring boot from selenium 3 to selenium 4

(implementation 'org.seleniumhq.selenium:selenium-java:4.1.1')
But chrome, firefox and edge web drivers remains from selenium version 3
(org.seleniumhq.selenium:selenium-chrome-driver:3.141.59).
If I remove spring boot dependency from project, they updates to 4.1.1

Currently using gradle version "7.3.3".
Spring boot "2.6.3".
Spring dependency management "1.0.11.RELEASE".

Any ideas why this happens, I hoped that dependency hell dissapeared with spring boot creation)

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

颜漓半夏 2025-02-20 21:10:26

我有相同的促销,我在弹簧启动启动过程中发现了〜/.m2/repository/org/strprmework/boot/boot/spring-boot intedencies/2.6.3/spring中有一个弹簧启动依赖性。 -boot依赖性-2.6.3.pom,该声明为< selenium.version> 3.141.59</selenium.version>在属性中,因此您可以尝试

<properties>
    <selenium.version>4.1.2</selenium.version>
</properties>

在项目pom.xml中尝试添加。

I have the same promble, I found in spring-boot-starter-parent, there is a spring-boot-dependencies in ~/.m2/repository/org/springframework/boot/spring-boot-dependencies/2.6.3/spring-boot-dependencies-2.6.3.pom, which declared <selenium.version>3.141.59</selenium.version> in properties, so you can try add

<properties>
    <selenium.version>4.1.2</selenium.version>
</properties>

in your project pom.xml.

逐鹿 2025-02-20 21:10:26

Spring Boot配备了一套知道可以一起使用的版本。但是您可以在构建脚本中覆盖它们。如果是Gradle,请添加到build.gradle

ext['selenium.version'] = '4.1.2'

Spring Boot comes with a set of versions that are know to work together. But you can override them in your build script. In case of Gradle, add to build.gradle:

ext['selenium.version'] = '4.1.2'
诗化ㄋ丶相逢 2025-02-20 21:10:26

这是因为Spring Boot包装了一组预定义的依赖esecies,您可以在这里找到:

在此页面中,您还将找到如何更改预期预期的预期版本。通常,您需要将.version添加到依赖项名称中,并且在多个单词名称的情况下,将空格更改为破折号(在硒中不需要)。

因此,要将版本更改为最新版本,请输入build.gradle ext ['selenium.version'] ='4.4.0'在0缩进级别。 (不要添加它,说内部依赖项{}

It is because Spring Boot comes packed with a set of predefined dependecies that you can find here: https://docs.spring.io/spring-boot/docs/2.6.7/reference/htmlsingle/#appendix.dependency-versions

In this page, you will also find, how to change predefined version. In general, you need to add .version to your dependency name and, in case of multiple word names, you change spaces to dashes (not needed in case of selenium).

So, to change version to most recent, type in build.gradle ext['selenium.version'] = '4.4.0' at 0 indent level. (don't add it, say inside dependencies {})

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文