Here is the detail and options I have tried.
As soon as URL is launched, a authenticate pop gets displayed at the top center of screen.
The popup does not have any webElements.(No Inspect option or F12 does not show up any elements)
I tried using Alert, getWindowHandle(s) nothing seems to be working.
I tried traditional way
driver.get("http://UserName:Password@Example.com");
Even this does not work as my URL is secured URL, does.
Is there any way I can handle this using Java code in Selenium
// Attempt 1:
String logScrn= driver.getWindowHandle();
System.out.println(logScrn);
driver.findElement(By.id(logScrn)).sendKeys("username" + Keys.TAB + password");
// Attempt 2:
Alert alert = driver.switchTo().alert();
alert.sendKeys("username" + Keys.TAB + "password" + Keys.TAB);
alert.accept();