I want to use a headless browser to test a website in an internal network. The site makes use of basic authentication rather than a login page though so I've thus far been using something like https://username:[email protected] to access the site with my scripts.
I tried looking but is there any headless browser that supports using something like that as a URL?
I'm currently using HtmlUnitDriver with Selenium but it appears to not be working. When using the Firefox Driver, I'm able to log in just fine but I'm apparently getting 401 - Unauthorized: Access is denied due to invalid credentials
when I try using HtmlUnitDriver.
For reference, I'm just using a simple driver.get(url)
to open the page.
HtmlUnitDriver driver = new HtmlUnitDriver();
String url = "https://"+ uName + ":" + uPassword + "@" + testEnvironment;
driver.get(url);
System.out.println(driver.getTitle());
System.out.println(driver.get(url));
to see it ? – Mesut GUNEShttps://username:[email protected]
– pirphesdercia