there was an error managing chromedriver linux64 (for input string: "linux64")

563 Views Asked by At
17:10:40.226 [main] DEBUG io.github.bonigarcia.wdm.WebDriverManager - Driver to be downloaded chromedriver linux64
17:10:40.229 [main] ERROR io.github.bonigarcia.wdm.WebDriverManager - There was an error managing chromedriver linux64 (For input string: "linux64")
java.lang.NumberFormatException: For input string: "linux64"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

Description of the problem: I am getting below exception while running the test in chrome:

java.lang.NumberFormatException: For input string: "public" 
  • Browser and version: Browser Version of Chrome : Version 123.0.6312.59

  • Operating system and architecture: Windows 11 & 64 Bit

  • Selenium version: 3.141.59

  • WebDriverManager version: 4.4.3

WebDriverManager call:

WebDriverManager.chromedriver().clearDriverCache().setup();
WebDriverManager.chromedriver().setup();
2

There are 2 best solutions below

4
Vikrant Singh On

Issue started with WebDriverManager version 5.6.0, with exception below:

Caused by: io.github.bonigarcia.wdm.config.WebDriverManagerException: java.lang.NumberFormatException: For input string: "linux64"

First Try with the below code snippets

**

public class ChromeDriverManager(){
protected WebDriver driver;
public void initializeDriver(){
ChromeOptions options = new ChromeOptions();
    options.addArguments("disable-infobars");
    options.addArguments("--lang=en");
    options.addArguments("--no-sandbox");
    options.addArguments("--disable-dev-shm-usage");
    options.addArguments("--start-maximized");
    options.addArguments("--disable-popup-blocking");
    WebDriverManager.chromedriver().clearDriverCache().setup();
    driver = new ChromeDriver(options);
    ....
}

}

**

if getting same issue then try with the below code snippets

**

WebDriverManager.chromedriver().clearDriverCache().setup();

**

also for the same problem you've to **

**update webdrivermanager to version 5.6.4**
0
Shawn On

Your selenium version 3.141.59 is way too old to support latest browser versions.

Upgrade to latest selenium(4.18.1).

And if you upgrade to latest selenium, you don't need WebDriverManager to handle the chrome drivers. Selenium Manager will do browser driver management automatically.

Java code to initialise driver and launch browser can be as simple as:

WebDriver driver = new ChromeDriver();
driver.get("https://www.google.com");
driver.quit();

Imports:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;