Environment: Testcafe 3.6.0
Chrome Version 125.0.6422.112 (Official Build) (64-bit)
on Fedora 40 and AlmaLinux 8
What command line parameters can I pass to Chrome, or perhaps by using the Runner config object https://testcafe.io/documentation/402661/reference/testcafe-api/runner/browsers (which just passes command line params to the browser), to turn off the "Check your saved passwords" and "Save password?" popups that Chrome shows?
After my test script fills in the username and password textboxes and clicks Submit, the page naturally refreshes and Chrome pops up these two dialog boxes:
These are separate from the page content and managed by the window manager, so they do not interfer with on-page content or (I think) test execution.
I am using generic test credentials with an easily guessed password, but we do not care about that because it's in a local test environment. As a workaround I can change the password being used to be more secure but it would be nice to simply disable these security popups while running unit tests against our website.
I'm not sure if they are interfering with our test, but they are very annoying to have on the screen while the test is running.
The closest I've found on the web is this post from 2020 which advises going into the Settings page and unchecking an option https://support.google.com/chrome/thread/71768454/check-your-passwords-popup-how-do-i-stop-it-on-windows?hl=en
Try adding the Chrome --guest
option to prevent this behavior. In guest mode, Chrome doesn't check for saved passwords or user data, which can help you avoid issues related to password prompts.
testcafe 'chrome --guest' test.js
The guest mode ensures that Chrome runs without accessing any personal data, extensions, or saved passwords, providing a clean and isolated browsing session.