Team,
I was trying to build a basic selenium tests using maven. But i am the getting the error "FirefoxDriver cannot be resolved to a type" error. When i tried add the external jars via project build path, i am not seeing this error. Only when i use the maven dependency in POM i am seeing this error. Any help is deeply appreciated.
My Selenium Code:
package mavenramdemo;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.Test;
public class HelloTest {
@Test
public void testOne() {
// TODO Auto-generated method stub
System.setProperty("webdriver.gecko.driver","D:\\Firefox
Driver\\geckodriver-v0.17.0-win64//geckodriver.exe");
WebDriver d=new FirefoxDriver();
d.get("https://www.google.com");
String actualt=d.getTitle();
String etitle="Google";
if(actualt.equals(etitle))
{
System.out.println("Passed");
}
else
{
System.out.println("Failed");
}
}
}
in the above code i am getting error at WebDriver d=new FirefoxDriver();
My POM file:
<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>3.12.0</version>
</dependency>
</dependencies>
</project>
I tried different options like putting only 1 repo for seleium, etc but no luck.
I am struck at this issue for last 2 weeks. I observed that couple of jars are not getting downloaded with selenium-java repo. But,again i am unable to fix this.please help