Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97788

Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver

$
0
0

I have added the most updated Selenium dependency in my pom.xml

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
    <version>3.7.1</version>
</dependency>

I ran mvn clean install inside the directory with my pom.xml and I have also imported the correct classes in my app class as per the Selenium documentation

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

However when i try and run my main method, I get the following error

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/openqa/selenium/WebDriver

I look in my ~/.m2/repository folder and I don't see an openqa folder but instead I see a seleniumhq folder.

Why didn't maven install the openqa folder, and why does the documentation say to import from org.openqa... when that never exist in my jar repository. I'm very confused, I just want to be able to import selenium Webdriver successfully while having it in my local repository.


Viewing all articles
Browse latest Browse all 97788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>