How to setup FireFox driver for Selenium 3.0 with Eclipse NEON 2.0

Trabla: How to setup FireFox driver for Selenium 3.0 with Eclipse NEON 2.0


How to setup FireFox driver for Selenium 3.0 with Eclipse NEON 2.0


Solving:



Source code  used in tutorial:


package Pack;


import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.DesiredCapabilities;

public class settingUp {


public static void main(String[] args) {
// TODO Auto-generated method stub


}
@Test
  public void drivers () {

System.setProperty("webdriver.gecko.driver","D:\\Selenium\\geckodriver-v0.14.0-win64 (1)\\geckodriver.exe");
   DesiredCapabilities capabilities=DesiredCapabilities.firefox();
   capabilities.setCapability("marionette", true);
   WebDriver driver = new FirefoxDriver(capabilities);
   driver.get("https://google.com/");

  }
}


No comments:

Post a Comment