Posts

Showing posts with the label selenium-chromedriver

How to enable password saving in Chrome run by Capybara through Selenium?

How to enable password saving in Chrome run by Capybara through Selenium? I wrote a test using Capybara that checks whether Chrome's auto-fill feature works correctly for my web application's login form. If running the web application in the browser and saving the password after registration, Chrome automatically fills the login form. However for the automated test, I didn't find a way to make Chrome save the password of the registration form that's been entered by Capybara/Selenium. It seems like the popup for this isn't even shown. Is there a way to enable the saving of passwords? 1 Answer 1 You can try this: Capybara.register_driver :selenium do |app| preferences = {credentials_enable_service: true, password_manager_enabled: true} capabilities = Selenium::WebDriver::Remote::Capabilities.chrome capabilities['chromeOptions'] = {'prefs' ...