CodedUI - Windows Authentication in Chrome Browser RRS feed

  • Question

  • I'm using "Cross Browser Selenium Components" plugin to run codedui tests in Chrome browser. When i launch my web application, it needs windows authentication to log in to the website.

    How do i pass the username and password along with the URL in coded UI?

    Webdriver equivalent code is:

    baseUrl=”http://” + username + “:” + password + “@” + url;

    driver.get(baseUrl + “/”);

    But in codedui, when i execute the below code, authentication window pops up but the control does not get past browser.NavigateToURL and hence i cannot provide username and password.

            BrowserWindow.CurrentBrowser = "chrome"; 
            string URL = "http://servername:portnumber/index.jsp";             
            BrowserWindow browser = BrowserWindow.Launch();
            browser.NavigateToUrl(new Uri(URL));

    Any help would be highly appreciated please.

    Wednesday, August 8, 2018 12:59 AM

All replies

  • Solution for this is:

    string URL = "http://" + username + ":" + password + "@servername:portnumber/index.jsp";

    Please refer to the post below:

    Thursday, August 16, 2018 5:59 AM