LearnerLaksh
LearnerLaksh

Reputation: 60

Issue while integrating selenium with cucumber with maven

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

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 ?

Upvotes: -3

Views: 381

Answers (1)

LearnerLaksh
LearnerLaksh

Reputation: 60

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

Upvotes: 0

Related Questions