How to specify the location of the chromedriver binary

前端 未结 3 1855
时光取名叫无心
时光取名叫无心 2020-12-16 17:38

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

3条回答
  •  太阳男子
    2020-12-16 18:05

    In Selenium webdriver 3.x configs, change:

    caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"binary" => })
    Capybara::Selenium::Driver.new(app, :browser => :chrome, :driver_path => , :desired_capabilities => caps)
    

    driver_path: Define path to chromedriver chromedriver page

    binary: Define path to binary chrome app chromepage. You can use a chrome portable to use differents versions of chrome.

提交回复
热议问题