Unable to handle Chrome authentication popup in Selenium web driver C# with the latest Desktop version of Chrome RRS feed

  • Question

  • I am trying to handle the chrome authentication popup in Selenium web driver with c#, but it giving an error No such alert found.


    Below is the code:

                var alert = Driver.SwitchTo().Alert();
                alert.SetAuthenticationCredentials("testuser", "testuser");

    Chrome Verison: 76

    I am trying to run my selenium c# specflow tests on Jenkins machine, and every time after entering url I get an authentication popup.


    Wednesday, August 7, 2019 1:05 PM

All replies

  • Hi Adrusta,

    Welcome to MSDN forum.

    Please try to check values are username and password for SetAuthenticationCredentials 

    And if you password has "@" symbol, please replace it with "%40".

    If it persists, please add one more credential method:

    driver.URL = ""

    Please refer more this video: How to handle basic authentication window in selenium webdriver explained

    Any feedback will be expected.

    Best Regards,


    Note: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. 

    Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.

    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet

    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, August 8, 2019 5:55 AM