使用selenium webdriver在eclipse中出现java.lang.NullPointerException错误

时间:2017-12-05 01:13:34

标签: java selenium-chromedriver

我在eclipse中运行我的测试时遇到此错误"在以下期间发生内部错误:"启动TestOne"。 java.lang.NullPointerException。有人可以帮助我,我已经添加了所有必需的罐子。

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;

public class TestOne {

    public static void main(String[] args) {
        System.setProperty("webdriver.chrome.driver", "C:/Program Files/Drivers");
        WebDriver driver = new ChromeDriver();
        driver.get("google.com");
        System.out.println("Page is accessible");
    }
} 

0 个答案:

没有答案