Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium 4.1 and Spring boot Web driver version issue

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!

like image 709
whoismaikl Avatar asked Feb 20 '26 03:02

whoismaikl


1 Answers

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.

like image 98
guanyuan he Avatar answered Feb 24 '26 15:02

guanyuan he



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!