Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA

Problem :

I am not able to run my script in any of the browsers. Below is the error i get for firefox. The location where firefox is installed is correct.

import static org.junit.Assert.*;
import org.junit.After; 
import org.junit.Before; 
import org.junit.Test; 
import org.openqa.selenium.By; 
import org.openqa.selenium.WebDriver; 
import org.openqa.selenium.firefox.FirefoxDriver; 
import org.openqa.selenium.firefox.FirefoxProfile;

public class FirstTest {
private WebDriver _driver;
 public void setUp() throws Exception {
System.setProperty("webdriver.firefox.driver","C:\\Program Files\\Mozilla Firefox15\\Firefox.exe");
FirefoxProfile firefoxProfile = new FirefoxProfile();
_driver = new FirefoxDriver(firefoxProfile);

public void Login() throws Exception {
assertEquals("Google", _driver.getTitle());
_driver.findElement(By.linkText("Selenium - Web Browser Automation")).click();
assertEquals(" ", _driver.getTitle());
assertEquals("Selenium - Web Browser Automation", _driver.getTitle());
@After public void tearDown() throws Exception {


File pathToBinary = new File("C:\\Program Files\\Mozilla Firefox15\\Firefox.exe");
FirefoxBinary ffBinary = new FirefoxBinary(pathToBinary);
FirefoxProfile firefoxProfile = new FirefoxProfile();
FirefoxDriver _driver = new FirefoxDriver(ffBinary,firefoxProfile);


"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s