Reputation: 31
I need help in setting up selenium in MAC OS. I have added all the required selenium jar files and java JRE to build path. I have added java path in .profile But still I am still getting error for Firefox driver.
The type org.openqa.selenium.firefox.FirefoxDriver is not accessible
Can you please help.
Upvotes: 0
Views: 6628
Reputation: 1
The pretty simple solution is " You might have created module while creating the package. So simply delete the module it will resolve the issue. It worked for me!!
Upvotes: 0
Reputation: 13
From what I can see in your 'Referenced Libraries' folder, you seem to have added both the selenium-standalone-3.x.x.jar and the individual client-combined-3.x.x versions of the jar files (selenium client jars for java). Is it possible that your eclipse does not know which libraries to finally use? Request you to remove all the libraries in your build path and add ONLY the selenium-server-standalone-3.x.x.jar file. Once done, refresh and this should resolve.
Also, once the right jars are in place, the import should resolve even without the System.setProperty instruction in your class file.
If the issue persists, could you please paste a screen capture without the right-click context menu on the error? Hope this helps.
Upvotes: 0
Reputation: 19
To resolve this issue,
Create new class and move on with your work!!!
Upvotes: 1
Reputation: 193108
This error message...
The type org.openqa.selenium.firefox.FirefoxDriver is not accessible
...implies that the GeckoDriver was not accessible by your program/script,
Your main issue is the presence of numerous unwanted JAR files containing the same class which are:
Download the required format of GeckoDriver executable from mozilla/geckodriver, extract the binary and then initialize the FirefoxDriveras follows:
//imports
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
//other lines of code
System.setProperty("webdriver.gecko.driver","C:\\path\\to\\geckodriver.exe");
driver = new FirefoxDriver();
driver.get("https://www.google.com/");
Upvotes: 2