错误:类chrome_driver中找不到主要方法

时间:2016-08-05 05:21:55

标签: java selenium selenium-chromedriver

Error: Main method not found in class chrome_driver, please define the main method as: public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application

    import org.openqa.selenium.WebDriver;

    import org.openqa.selenium.chrome.ChromeDriver;

    import javax.swing.*;

    import java.io.IOException;

    public class chrome_driver {

        public static void main(String[] args) {

            System.setProperty("webdriver.chrome.driver", "C:/Users/Admin/Desktop/chromedriver_win32/chromedriver.exe");
            WebDriver driver = new ChromeDriver();              
            driver.get("http://www.google.com");

        }
    }

如何修复此错误消息?

0 个答案:

没有答案