Posts

Showing posts with the label selenium

Unable to open Edge in InPrivate mode using selenium web driver

Unable to open Edge in InPrivate mode using selenium web driver From the C# object model, it looks like this should do the trick, but the UseInPrivateBrowsing property has no effect at my end. Just opens a regular browser session in the edge. var options = new EdgeOptions(); options.UseInPrivateBrowsing = true; var driver = new EdgeDriver(options); I am using the latest Selenium.WebDriver.MicrosoftDriver. These are the installed packages: <?xml version="1.0" encoding="utf-8"?> <packages> <package id="NUnit" version="3.10.1" targetFramework="net47" /> <package id="NUnit3TestAdapter" version="3.10.0" targetFramework="net47" /> <package id="Selenium.Chrome.WebDriver" version="2.40" targetFramework="net47" /> <package id="Selenium.Support" version="3.13.0" targetFramework="net47" /> <package id="Sel...

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' ...