Question

I have a simple test which is opening the page, clicking one button and clicking the next button in the appeared light box (I'm finding the elements by id). I can run this test in Visual Studio and it passes successfully for IE and Chrome browsers, but when I try to force it from CuiseControl.Net it fails for IE with the following exception:

Test Error : WilcoWebClient.WebdriverTests.RequestTest(IE).TestCreateRequest
OpenQA.Selenium.ElementNotVisibleException : Element is not displayed

Could anyone help me to find out why it fails?

I am using:

  • Windows Server 2008 R2
  • Selenium.WebDriver 2.39.0
  • Selenium.WEbDriver.IEDriver 2.35.3.3 WebDriver.ChromeDriver.win32
  • Cruise Control: Version : 1.8.4.0

No correct solution

OTHER TIPS

I've installed selenium server and it helped. Here is the piece of my code:

public enum Browser
{
    IE,
    CHROME,
    REMOTE_IE,
};

private IWebDriver CreateWebdriver(Browser browser)
    {
        IWebDriver driver = null;
        switch (browser)
        {
            case Browser.IE:
                InternetExplorerOptions ieOptions = new InternetExplorerOptions();
                ieOptions.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
                ieOptions.RequireWindowFocus = true;
                driver = new InternetExplorerDriver(ieOptions);
                break;
            case Browser.CHROME:
                driver = new ChromeDriver();
                break;
            case Browser.REMOTE_IE:
                driver = new RemoteWebDriver(
                    new Uri(Utils.BASE_URL + ":4444/wd/hub"), 
                    DesiredCapabilities.InternetExplorer());
                break;
        }
        if (driver == null)
        {
            throw new Exception("Couldn't initialize WebDriver for browser " + browser.ToString());
        }
        return driver;
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top