0

I am facing the below issue java.lang.NoSuchMethodError: 'java.lang.String org.apache.commons.io.IOUtils.toString(java.io.InputStream, java.nio.charset.Charset)' on line "WebDriverManager.chromedriver().setup();

I am using the latest WebDriverManager version i.e 5.3.1 and the latest commons.io version i.e 2.11.0

Boni García
  • 4,618
  • 5
  • 28
  • 44
  • Q: are you including Apache Commons (including, but not limited to, commons.io) in your classpath? If you're using Maven (or equivalent) for your build, then it should automatically identify, download and include library dependencies for you. Otherwise, you'll need to add the dependencies yourself, manually. – paulsm4 Dec 23 '22 at 06:35
  • No, I haven't added that in the .classpath file. Do I have to? I have already added below code in the pom.xml commons-io commons-io 2.8.0 – Sai Krishna Dec 23 '22 at 06:43

1 Answers1

0

WebDriverManager 5.3.1 depends transitively on commons-io 2.6. You can try to force that version in your pom.

Boni García
  • 4,618
  • 5
  • 28
  • 44