I am trying to handle authentication popup through my selenium test by passing username and password in URL.
I have tried following solutions:
- I have tried to send username and password in URL
- I have tried handling with alert, it doesn't work.
- I have tried solutions provided in - How to handle authentication popup with Selenium WebDriver using Java, almost all other than AutoIT, none of them worked for me
I have a Maven project, I am trying to send url with username and password from project.properties file, which looks like this -
URL = https://username:password@URL
open url code-
WebDriver driver = new ChromeDriver();
driver.navigate.to(URL);
I get below error in browser console: "there has been a problem with your fetch operation: Failed to execute 'fetch' on 'Window': Request cannot be constructed from a URL that includes credentials"