0

I'm building a Java 21 + Spring Boot 3 automation project where I use Selenium to automate Chrome. The Chrome browser opens correctly via ChromeDriver, everything was working a month ago, but now file downloads are not getting completed at all, the .crdownload file gets created but it never completes. screenshot of file downloads not completing

I have tried to update the drivers to my chrome version, which was automatic updated and have configured Chrome for Testing as well, but no luck.

🧱 Setup:

  • Java 21
  • Spring Boot 3
  • Selenium version: 4.10 (have tried 4.31.0 as well)
  • Chrome version: 135.0.7049.85
  • chromedriver: 135.0.7049.84 (downloaded via WebDriverManager)

Config class:

@Configuration
public class WebDriverConfig {

    @Bean
    public WebDriver webDriver() {
        // Setup ChromeDriver
        WebDriverManager.chromedriver().setup();

        // Chrome Options
        ChromeOptions options = new ChromeOptions();
        options.setBinary("chrome/win64-135.0.7049.84/chrome-win64/chrome.exe");
        options.addArguments("--start-maximized");
        options.addArguments("--disable-notifications");
        options.addArguments("--remote-allow-origins=*");
        options.addArguments("--disable-gpu");
        options.addArguments("--window-size=1920,1080");

        WebDriver driver = new ChromeDriver(options);
        System.out.println("✅ ChromeDriver started and should be visible now!");
        return driver;
    }
    
}

Console log:

2025-04-13T03:48:01.369+05:30  INFO 14204 --- [automate] [           main] c.t.automate.AutomateApplication         : Starting AutomateApplication using Java 21.0.2 with PID 14204 (D:\Projects\JavaProjects\automate\target\classes started by Light in D:\Projects\JavaProjects\automate)
2025-04-13T03:48:01.376+05:30  INFO 14204 --- [automate] [           main] c.t.automate.AutomateApplication         : No active profile set, falling back to 1 default profile: "default"
2025-04-13T03:48:02.454+05:30  INFO 14204 --- [automate] [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 8080 (http)
2025-04-13T03:48:02.471+05:30  INFO 14204 --- [automate] [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2025-04-13T03:48:02.471+05:30  INFO 14204 --- [automate] [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.36]
2025-04-13T03:48:02.547+05:30  INFO 14204 --- [automate] [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2025-04-13T03:48:02.549+05:30  INFO 14204 --- [automate] [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1119 ms
2025-04-13T03:48:02.884+05:30  INFO 14204 --- [automate] [           main] i.g.bonigarcia.wdm.WebDriverManager      : Using chromedriver 135.0.7049.84 (resolved driver for Chrome 135)
2025-04-13T03:48:02.903+05:30  INFO 14204 --- [automate] [           main] i.g.bonigarcia.wdm.WebDriverManager      : Exporting webdriver.chrome.driver as C:\Users\Light\.cache\selenium\chromedriver\win64\135.0.7049.84\chromedriver.exe
2025-04-13T03:48:04.929+05:30  WARN 14204 --- [automate] [           main] o.o.selenium.devtools.CdpVersionFinder   : Unable to find CDP implementation matching 135
2025-04-13T03:48:04.930+05:30  WARN 14204 --- [automate] [           main] o.o.selenium.chromium.ChromiumDriver     : Unable to find version of CDP to use for 135.0.7049.84. You may need to include a dependency on a specific version of the CDP using something similar to `org.seleniumhq.selenium:selenium-devtools-v86:4.25.0` where the version ("v86") matches the version of the chromium-based browser you're using and the version number of the artifact is the same as Selenium's.
✅ ChromeDriver started and should be visible now!
2025-04-13T03:48:05.279+05:30  INFO 14204 --- [automate] [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port 8080 (http) with context path '/'
2025-04-13T03:48:05.288+05:30  INFO 14204 --- [automate] [           main] c.t.automate.AutomateApplication         : Started AutomateApplication in 4.454 seconds (process running for 4.938)

And the pom.xml:

    <!-- Selenium WebDriver -->
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>4.10.0</version>
    </dependency>

    <!-- WebDriverManager (to manage ChromeDriver automatically) -->
    <dependency>
        <groupId>io.github.bonigarcia</groupId>
        <artifactId>webdrivermanager</artifactId>
        <version>5.5.0</version>
    </dependency>

I have tried:

  • updating the dependencies.
  • updating the chromedriver and chrome as well
  • adding the selenium devtools

but no luck, not sure how to resolve the issue

1
  • 1
    Can you add "selenium-devtools-v116" to your maven and try. Commented Apr 13 at 15:19

1 Answer 1

1

I'm running into the same problem with my Spring Boot app, except I am using Gradle.

In build.gradle, (Gradle's equivalent to pom.xml) I originally had this, with no version, but it would not download the latest 4.31.0. The jars in the Gradle cache were version 4.25.0

testImplementation("org.seleniumhq.selenium:selenium-java")

What worked for me was to identify ALL the selenium jar files that had to be downloaded, and use implementation instead of testImplementation.

implementation("org.seleniumhq.selenium:selenium-api:4.31.0")
implementation("org.seleniumhq.selenium:selenium-bom:4.31.0")
implementation("org.seleniumhq.selenium:selenium-chrome-driver:4.31.0")
implementation("org.seleniumhq.selenium:selenium-chromium-driver:4.31.0")
implementation("org.seleniumhq.selenium:selenium-devtools-v133:4.31.0")
implementation("org.seleniumhq.selenium:selenium-devtools-v134:4.31.0")
implementation("org.seleniumhq.selenium:selenium-devtools-v135:4.31.0")
implementation("org.seleniumhq.selenium:selenium-edge-driver:4.31.0")
implementation("org.seleniumhq.selenium:selenium-firefox-driver:4.31.0")
implementation("org.seleniumhq.selenium:selenium-http:4.31.0")
implementation("org.seleniumhq.selenium:selenium-ie-driver:4.31.0")
implementation("org.seleniumhq.selenium:selenium-java:4.31.0")
implementation("org.seleniumhq.selenium:selenium-json:4.31.0")
implementation("org.seleniumhq.selenium:selenium-manager:4.31.0")
implementation("org.seleniumhq.selenium:selenium-os:4.31.0")
implementation("org.seleniumhq.selenium:selenium-remote-driver:4.31.0")
implementation("org.seleniumhq.selenium:selenium-safari-driver:4.31.0")
implementation("org.seleniumhq.selenium:selenium-support:4.31.0")

Since you are using Maven, you will need to make similar changes to the pom.xml. I know this is a little bit of a hack, Gradle and Maven should pull all related jars, but for whatever reason it isn't currently doing that now.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.