I'm running my Automation test scripts on saucelabs from my local setup . While accessing to my application its redirecting to authentication pop-up . I'm unable to get webelement using Inspect element . How to insert username , password and click on OK button.
String alertMessage= driver.switchTo().alert().getText();
// Displaying alert message
System.out.println("YES:-----------"+alertMessage);
driver.switchTo().alert().sendKeys("funsu");
Thread.sleep(3000);
driver.switchTo().alert().accept();
Getting error :-
org.openqa.selenium.NoAlertPresentException: no such alert
(Session info: MicrosoftEdge=111.0.1661.41)