While trying to launch firefox browser using selenium
Function:
System.setProperty("webdriver.gecko.driver", Constants.PROJECT_PATH+Constants.MARIONETTE_FIREFOX);
log.info("Marionette file path: "+Constants.PROJECT_PATH+Constants.MARIONETTE_FIREFOX);
MarionetteDriverManager.getInstance().setup();
In the 3rd line i am getting the mentioned error message -
"java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.copyInputStreamToFile(Ljava/io/InputStream;Ljava/io/File;)"
Maven Dependency tags I am using is
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
New dependecy tags added following #Christian Lutz answer
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
How can I re-solve the issue?
In version 1.3.2 the class FileUtils
doesn't have a method copyInputStreamToFile
you need at least version 2.0
Please see the javadoc for the current version 2.5
. There you will find the method and a Since
tag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With