Selenium Webdriver: Specify filepath for Firefox exe Selenium Webdriver: Specify filepath for Firefox exe selenium selenium

Selenium Webdriver: Specify filepath for Firefox exe


You should use FirefoxBinary instead of FirefoxProfile as below

FirefoxBinary binary = new FirefoxBinary(new File("path/to/binary"));FirefoxOptions options = new FirefoxOptions();options.setBinary(binary);IWebDriver driver = new FirefoxDriver(options);


Another option is to configure the system property.

System.Environment.SetEnvironmentVariable("webdriver.firefox.bin", 'path/to/binary');