Is it possible to pass Username and password through URL in Firefox browser for Selenium 4.0.0 version? I am able to pass through selenium 3.141.59 version but not able to pass through Selenium 4 version. Also I can able to pass to Chrome and edge browser using Dev tools concept.
Sample Code I used is:
FirefoxOptions options = new FirefoxOptions();
options.setAcceptInsecureCerts(true);
options.setCapability("build", "Testing Firefox Options [Selenium 4]");
options.setCapability("name", "Testing Firefox Options [Selenium 4]");
options.setCapability("platformName", "Windows 10");
options.setCapability("browserName", "Firefox");
options.setCapability("browserVersion", "95.0");
try {
driver = new RemoteWebDriver(new URL("http://" + username + ":" + Password+
"@hub.lambdatest.com/wd/hub"), ((Capabilities) options));
} catch (MalformedURLException e) {
System.out.println("Invalid grid URL");
}driver.get("https://www.lambdatest.com");
While using the code snippet, I am not able to create any new session in Firefox. I want to be like: http://username:password@the-site.com
Is there any way to do this or does selenium 4 doesn't support this functionality in Firefox browser?