Mahmoud Nabuwi R
Mahmoud Nabuwi R

Reputation: 11

The type org.openqa.selenium.WebDriver is not accessible

I got an error The type org.openqa.selenium.WebDriver is not accessible after uplaoding JArS files of selenium webdriver usinf eclipse IDE & JAVA . I need your help please ?

package samplePackage;
import org.openqa.selenium.WebDriver;

public class WebDriverDemo {

    public static void main(String[] args) {
        WebDriver;

    }

}

Upvotes: 0

Views: 9379

Answers (3)

Rajkamal Ann
Rajkamal Ann

Reputation: 21

Delete the module.java or module.info.java from your project

Upvotes: 2

DesertPride
DesertPride

Reputation: 133

If it has not already worked after what @pburgr has said, then make sure you have added the right JAR e.g. selenium-java-3.14.0.jar

If you have written import org.openqa.selenium.WebDriver; yourself then remove it, write WebDriver driver = new FirefoxDriver(); and then let eclipse import the correct classes itself. Or you can do Cmd+Shift+O and it will import the right classes automatically.

Upvotes: 1

Mahmoud Nabuwi R
Mahmoud Nabuwi R

Reputation: 11

I found the solution : delete the module.java from your project

Upvotes: 1

Related Questions