0

i am getting the above error .I have import all the libs related to selenium and java .Here is the code that i have written

package Driverbasic;

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

public class Driverbasics {

public static void main (String args [])
{
    
    System.setProperty("webdriver.gecko.driver", "/home/user/Downloads/geckodriver-v0.29.1-linux64");
    WebDriver driver = new FirefoxDriver();
}

}

Here is the error i am getting

Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/firefox/FirefoxDriver at Driverbasic.Driverbasics.main(Driverbasics.java:12) Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.firefox.FirefoxDriver at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 1 more I have attached the screenshot for the same .enter image description here

enter image description here

Any help would be really appreciated .

0 Answers0