I'm making tests for the company where i'm doing my intership, but i don't know how to make that the script put my credentials in this part, if i enter in the page(myself, not the chromedriver) automatically gets the credentials from the login on my pc, obviously the test driver can't do that, that's why i get that alert, my question is how can i put the credentials there automatically? for now i'm putting a thread sleep and putting the credentials manually but i know that's not the optimal way to do it, i already try using the alert methods:
var alert = driver.SwitchTo().Alert();
alert.SetAuthenticationCredentials("user","password");
alert.Accept();
But I get this error:
Message: OpenQA.Selenium.NoAlertPresentException : no such alert
(Session info: chrome=87.0.4280.141)
And if i put a wait i got a timeout but nothing happen, as you can see i'm using chrome, i read a post from some years that chrome can't manage alerts, but i don't know if that's a thing today, i hope you guys can help me.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…