Earlier I had put the Chrome binary, \"chromedriver.exe\", in the \"C:/Windows\" directory and Watir was picking it from there. Now I have to move my project to another mach
driver_path
directly.Just call this before launching your new Chrome browser window:
Selenium::WebDriver::Chrome::Service.driver_path = Rails.root.join( "lib", "chromedriver" ).to_s
Of course, change the path to where your chromedriver
is.
NOTE: driver_path
needs to be a String, so don't pass in a File
or Path
object.