I have 2 firefox versions installed in my system. They are version 61.0b.10 and version 44.0.2. I normally use version 61.0b.10 to practice selenium. I was trying to learn to launch different version of firefox. So, I was trying to launch firefox version 44.0.2. I have used the below code.
System.setProperty("webdriver.firefox.driver", "C:\\Users\\user\\Firefox - Old\\firefox.exe");
FirefoxDriver driver = new FirefoxDriver();
and also the below code.
System.setProperty("webdriver.firefox.driver", "C:\\Users\\user\\Firefox - Old\\firefox.exe");
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", "false");
FirefoxOptions options = new FirefoxOptions(capabilities);
FirefoxDriver driver = new FirefoxDriver(options);
Both result in launching the firefox version 61.0b.10.
I have also tried the below code.
FirefoxOptions options = new FirefoxOptions();
options.setBinary(new FirefoxBinary(new File("C:\\Users\\user\\Firefox - Old\\firefox.exe")));
FirefoxDriver driver = new FirefoxDriver(options);
This code is giving me the exception: Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities