-3

I am facing the below error in the base class (Java Step Defination Class) The type org.openqa.selenium.remote.RemoteWebdriver cannot be resolved
enter image description here

I have tried with the solution provide to a similar question, However, none of them is working

  • Tried adding selenium remote driver class in the pom.xml
  • Tried clean the maven project and updating the project
  • Tried with new versions of cucumber, selenium java and other

Upon running the project I am facing the below issue or upon updating with new versions i am facing class not found error
enter image description here

Adding pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>SeleniumCucumber</groupId>
  <artifactId>WebAutomation101</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <dependencies>
  <dependency>
    <groupId>io.cucumber</groupId>
    <artifactId>cucumber-java</artifactId>
    <version>6.6.0</version>
</dependency>
<dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.141.59</version>
</dependency> 
<dependency>
    <groupId>io.cucumber</groupId>
    <artifactId>cucumber-junit</artifactId>
    <version>6.6.0</version>
    <scope>test</scope>
</dependency>
<dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
</dependency>
  </dependencies>
</project>

What is the root cause of this problem, is there a way to fix it ?

LearnerLaksh
  • 60
  • 1
  • 6

1 Answers1

0

I am able to resolve the issue after deleting the existing .m2 files from the system

LearnerLaksh
  • 60
  • 1
  • 6