vendredi 27 novembre 2015

Webdriver Chrome C# loses style when runned on localhost

I have a site developed in ASP.NET MVC. I run it in IIS. Then I try to do some tests using Webdriver for Chrome, but when I execute it, the site loses its style. Here's the code:

using (IWebDriver driver = new ChromeDriver())
        {
            driver.Navigate().GoToUrl("http://localhost:58178/SomeCoolPage");
            driver.FindElement(By.Id("SomeCoolId")).Click();
        }

Why does that happen? How would I fix it?

Aucun commentaire:

Enregistrer un commentaire