How To Launch Firefox Browser in Selenium Webdriver



Launching firefox browser in selenium webdriver (using Geckodriver)


To launch the firefox browser in selenium webdriver with java  just follow the below step

Step-1 first Download geckodriver.exe from GeckoDriver Github Release Page.
Step-2 second  Set the System Property for ("webdriver.gecko.driver" ) with the geckodriver.exe path - 

System.setProperty("webdriver.gecko.driver","geckodriver.exe path");


Example-
System.setProperty("webdriver.gecko.driver","D:\\Sandeep\\Soft\\geckoriver.exe");

Selenium code to Launch Firefox Browser using geckodriver:

Syntax:

package New;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

public class AutomationTesting
{
public static void main(String[] args)
{
System.setProperty("webdriver.gecko.driver","D:\\Sandeep\\Soft\\geckoriver.exe");
 WebDriver driver= new FirefoxDriver();
  driver.navigate().to("https://qaacharya.in/");
  driver.manage().window().maximize();
  driver.quit();
}
}


Hope !!! The above tutorial of launching firefox browser in selenium webdriver helpful for you ...
Team ,
QA acharya 

Tags: Launching firefox browser in selenium . launching firebox browse using gekodriver in selenium wbdriver  , how to launch firefox browser in selenium with java , firefox browser launching using selenium wbdriver.

Releated Post:
How To Launch Firefox Browser in Selenium Webdriver