Selenium -Download funktioniert nicht im Java + Spring Boot -Projekt (Chrome 135, Selen 4.31.0)Java

Java-Forum
Anonymous
 Selenium -Download funktioniert nicht im Java + Spring Boot -Projekt (Chrome 135, Selen 4.31.0)

Post by Anonymous »

Ich baue ein Java 21 + Spring Boot 3 Automation Project, bei dem ich Selen verwendet, um Chrom zu automatisieren. Der Chrombrowser wird über Chromedriver korrekt geöffnet, alles hat vor einem Monat funktioniert, aber jetzt wird die Datei -Downloads überhaupt nicht abgeschlossen. Die Datei .crdownload wird erstellt, aber es wird nie abgeschlossen. /> Ich habe versucht, die Treiber auf meine Chromversion zu aktualisieren, die automatisch aktualisiert wurde und auch Chrom zum Testen konfiguriert hat, aber kein Glück. 4.31.0 as well)
[*]Chrome version: 135.0.7049.85
[*]chromedriver: 135.0.7049.84 (downloaded via WebDriverManager)

Config class:

Code: Select all

@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;
}

}
< /code>
Konsolenprotokoll: < /p>
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)
und pom.xml :


org.seleniumhq.selenium
selenium-java
4.10.0




io.github.bonigarcia
webdrivermanager
5.5.0

< /code>
Ich habe es versucht: < /p>

Aktualisierung der Abhängigkeiten.>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post