0

Just started with my first automation test case using Selenium Webdriver and Java Eclipse. Successfully installed latest versions of JDK 9, Selenium Webdriver 3.8.1 and Eclipse Oxygen.

Also, I have created a Project> Configured the build path with Selenium Standalone server, Selenium nodeps, Selenium nodeps sources of 3.8.1 along with remaining lib files. I have used the below code and on Running the same I m seeing Error pop-up but with no message on what the problem is happening. Please help as I am very new to this.

Code:

package drivertest;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class ChromeTest {
    public static WebDriver driver;
    public static void main(String[] args)
        {
            System.out.println("launching chrome browser");
            System.setProperty("webdriver.chrome.driver","C:\\Selenium\\Chrome\\chromedriver.exe");
            driver = new ChromeDriver();
            driver.navigate().to("http://google.com");
        }
    }

Error screenshot:Eclipse Error on running

Steve
  • 11,596
  • 7
  • 39
  • 53
Riya Roy
  • 1
  • 1
  • 1
    Make sure you [configure Eclipse correctly](https://wiki.eclipse.org/Configure_Eclipse_for_Java_9) and then try looking for the logs if still nothing else. – Naman Dec 22 '17 at 03:25
  • Try to execute a simple Java Program and ensure if Eclipse is properly configured. @nullpointer 's pointer comment will be a valuable pointer in that direction. – undetected Selenium Dec 22 '17 at 12:16

1 Answers1

0

If your simple java program is working fine in your Eclipse then you should download jar file for Selenium webdriver version to 3.4 or below it. Sometimes we got issue in selenium webdriver while using latest versions.

You can follow this tutorial as well:

http://toolsqa.com/selenium-webdriver/configure-eclipse-with-selenium-webdriver/

Indrapal Singh
  • 364
  • 1
  • 2
  • 13