4

You should not be running tests on a machine used by user(s). Set up a dedicated computer or VM for testing and and use headless browser mode (more info here and here).


1

To add to the answer by @Klynt, although this is a solution, this is deprecated for browsers like firefox and chrome. In this approach, you don't really have expose your credentials. You can store your credentials as environment variables or in your .bashrc and export the same in your test. There is another approach as well, but you might need to downgarde ...


1

Selenium can be flaky with auto authentication. The simple solution is you're better off just altering the URL to include it. e.g. https://username:password@url.com


Only top voted, non community-wiki answers of a minimum length are eligible