Search code examples
selenium-webdriverrspecselenium-chromedrivercapybara

Update capabilities for out-of-the-box default drivers supported by Capybara?


In Capybara, I can just set a driver like this and execute tests easily:

Capybara.default_driver = :selenium_chrome_headless

However I need to update some capabilities, namely one that allows me to set the download path for chromedriver.

Is there a way to just update the default driver with capabilities? I'm looking to keep things easy without having to go through an entire thing with Capybara.register_driver.


Solution

  • No there isn’t, but it’s easy enough to just copy Capybaras registration into your project, modify it, and it will overwrite Capybaras registration