已经在项目中设置了所有的lib文件,但是Firefox没有启动,也没有引发错误。
/**
* @author vsarjunlogesh
*
*/
public class Real_Steel {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.setProperty("webdriver.gecko.driver", "C:\\selenium\\geckodriver-v0.23.0-win64\\geckodriver.exe");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities = DesiredCapabilities.firefox();
capabilities.setBrowserName("firefox");
capabilities.setVersion("31.0");
capabilities.setPlatform(Platform.WIN10);
capabilities.setCapability("marionette", false);
// firefoxOptions = new FirefoxOptions();
//firefoxOptions.setCapability("marionette", false);
WebDriver d1 = new FirefoxDriver(capabilities);
//WebDriver d1 = new FirefoxDriver();
d1.get("www.google.com");