How to pass HTTP Basic Authentication in XLT Chrome Driver


My purpose is to automate Google Chrome Browser

How to initialize the XLTChromeDriver ?
I have done via this way.

driver = new XltChromeDriver();

And I passed driver instance super() of noarg constructor. But chrome browser is not getting automated.

public class TestClass extends AbstractWebDriverScriptTestCase {

   public TestClass()
  1. I have added authentication credentials in

    com.xceptance.xlt.auth.userName = username
    com.xceptance.xlt.auth.password = password

HTTP Basic Authenticaiton works fine for XLTDriver
But its not working for XLTChromeDriver

  1. Also I have pointed the browser settings in too = D:/myproject/chromedriver_win32/chromedriver.exe = C:/Program Files (x86)/Google/Chrome/Application/chrome.exe

But these file mapping is not taken as that XltChromeDriver is missing system properties. Hence i passed these 2 attributes via System.setProperty() in a function and called it @BeforeClass static method to execute before @Test and NoArg Constructor

public static WebDriver getXLTChromeWebDriver(){
	capabilities =;
        System.setProperty("", "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe");
        System.setProperty("", "D:/myproject/chromedriver_win32/chromedriver.exe");
	driver = new XltChromeDriver(capabilities);
	driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
	return driver;

and called this function in static block so tat i can pass the instance in super()

 public static void initSetup(){
          driver = BrowserDriver.getXLTChromeWebDriver();
      baseurl = "";

Now the browser is coming. But the Authentication window is still showing. How to resolve this ?
The XLTChromeDriver mappings in is not taken i guess.

Any advice is appreciative


Hi Titus,

The properties

com.xceptance.xlt.auth.userName = username
com.xceptance.xlt.auth.password = password

apply to XLT’s browser emulation via HtmlUnit only and thus also work for XltDriver.

In contrast to XltDriver, XltChromeDriver is a standard ChromeDriver enhanced to run with our extension to measure client performance. As it uses a real browser, we can’t customize it the same way as we can do with HtmlUnit.

The only way to pass authentication credentials to a real browser is to encode them directly into the URL: