Reputation: 450
I'm new to Selenium and I have tried to setup my first Selenium test using IntelliJ and Selenium 2. I have followed the tutorials on the official Selenium site but I get this error:
cannot access org.openqa.selenium.remote.RemoteWebDriver
class file for org.openqa.selenium.remote.RemoteWebDriver not found
This is the tutorial I am using - http://seleniumhq.org/docs/03_webdriver.html#chapter03-reference
This is the location for the Maven setup I followed - http://seleniumhq.org/docs/appendix_installing_java_driver_Sel20_via_maven.html#importing-maven-into-intellij-reference
Here is the code:
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.WebDriverWait;
public class MyAppHomePageTest {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
}
}
The error occurs when I try to create a FirefoxDriver instance. Do I need to have the Selenium server as I thought this is no longer required.
I have tried the same in Eclipse and received the same error.
Thank you
Upvotes: 0
Views: 12483
Reputation: 9141
You should use this Maven dependency :
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.1.0</version>
</dependency>
According to this picture, you don't need a selenium-server dependency:
source : http://seleniumhq.org/download/maven.html
Upvotes: 3