Reputation: 21
Hi All anyone could help me? I faced an issue when Itried running using Maven command line mvn test'
,
based on issue report , the issue due to webdriver dependency 5.4.1 version.
Java that I used "11 version"
Below are dependencies I use :
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.4.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.11.0</version>
</dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
i tried running my selenium using maven command line,
Upvotes: 0
Views: 416
Reputation: 931
You have to change the source/target versions for your maven-compiler-plugin, it should be 11, not 1.8:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.2</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
Provided dependencies/plugins are poorly formatted in the original question, I believe that the mentioned plugin is located inside of the /build/plugins
Upvotes: 0