2

I'm having Watir login and do some stuff on the next page. This works fine on Firefox, but chrome loads the :

"Do you want google to save your password" dialog

which makes Watir hang. Running the script from irb, I'm noticing that at that point I'm losing access to the browser object.

Clicking "Never for this site" or "Save Password" doesn't seem to work either since it seems that every time that webdriver loads chrome, it loads in on a new session.

Any ideas?

Cris-O
  • 4,989
  • 3
  • 17
  • 11
  • webdriver? So does that mean your using the selenium chrome-driver? You could check out http://stackoverflow.com/questions/16301457/webdriver-chrome-browser-avoid-do-you-want-chrome-to-save-your-password-pop-u/32507680#32507680 – jemiloii Sep 10 '15 at 17:09

3 Answers3

2

If you go to Configuration -> Options -> Personal Stuff there's a check box for "Never offer to save passwords" that may change the setting for the program, rather than just the instance you're currently interacting with.

adam reed
  • 2,024
  • 18
  • 24
1

I had a similar problem (everything works in Firefox but not Chrome) and maybe this will help. Do you have any regular expressions in your code after the page loads?

In my code I modified this statement: @browser.text_field(:id => /txtfield/).wait_until_present

to this: @browser.text_field(:id => 'longform_txtfield').wait_until_present

That is to say that I removed the /txtfield/ regular expression and replaced it with the full id name of 'longform_txtfield'. Obviously you and I have very different code but try experimenting with commenting out certain lines after the page load to see what may be responsible. It just might turn out not to be the Password Manager after all!

Cheers!

1

I know this is may be an old question but I did stumble upon this question while looking for a solution using Watir-webdriver.

The below snippet will open a Chrome browser with the password manager disabled i.e. the "save your password" dialog will not pop-up;

profile = Selenium::WebDriver::Chrome::Profile.new
profile['profile.password_manager_enabled'] = false
@browser = Watir::Browser.new :chrome, profile: profile
Karl Cummins
  • 93
  • 1
  • 1
  • 8