For testing purposes I have multiple Firefox installations/versions on one machine made by using Utilu FF collection.
If there`s
b = Watir::Browser.new :ff
in test script, it is automatically executed with oldest FF version which is 3.6.22 in my case. I was surprised, because I assumed that by default script will be executed in Windows default browser which is Firefox6 not Firefox 3.6.22.
How to specify which installation/version of Firefox must be used for Watir-webdriver test script execution?
You can specify a path to your firefox executable:
require 'watir-webdriver'
Selenium::WebDriver::Firefox.path = "/path/to/firefox.exe"
b = Watir::Browser.new :firefox
For those using chromedriver
use:
Selenium::WebDriver::Chrome.driver_path = "path/to/chromedriver"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With