Table of Contents

Class InternetExplorerDriver

Namespace
OpenQA.Selenium.IE
Assembly
WebDriver.dll

Provides a way to access Internet Explorer to run your tests by creating a InternetExplorerDriver instance

public class InternetExplorerDriver : WebDriver, IWebDriver, IDisposable, ISearchContext, IJavaScriptExecutor, IFindsElement, ITakesScreenshot, ISupportsPrint, IActionExecutor, IAllowsFileDetection, IHasCapabilities, IHasCommandExecutor, IHasSessionId, ICustomDriverCommandExecutor, IHasVirtualAuthenticator
Inheritance
InternetExplorerDriver
Implements
Inherited Members
Extension Methods

Examples

[TestFixture]
public class Testing
{
    private IWebDriver driver;

    [SetUp]
    public void SetUp()
    {
        driver = new InternetExplorerDriver();
    }

    [Test]
    public void TestGoogle()
    {
        driver.Navigate().GoToUrl("http://www.google.co.uk");
        /*
        *   Rest of the test
        */
    }

    [TearDown]
    public void TearDown()
    {
        driver.Quit();
        driver.Dispose();
    }
}

Remarks

When the WebDriver object has been instantiated the browser will load. The test can then navigate to the URL under test and start your test.

Constructors

InternetExplorerDriver()

Initializes a new instance of the InternetExplorerDriver class.

public InternetExplorerDriver()

InternetExplorerDriver(InternetExplorerDriverService)

Initializes a new instance of the InternetExplorerDriver class using the specified driver service.

public InternetExplorerDriver(InternetExplorerDriverService service)

Parameters

service InternetExplorerDriverService

The InternetExplorerDriverService used to initialize the driver.

InternetExplorerDriver(InternetExplorerDriverService, InternetExplorerOptions)

Initializes a new instance of the InternetExplorerDriver class using the specified InternetExplorerDriverService and options.

public InternetExplorerDriver(InternetExplorerDriverService service, InternetExplorerOptions options)

Parameters

service InternetExplorerDriverService

The DriverService to use.

options InternetExplorerOptions

The InternetExplorerOptions used to initialize the driver.

InternetExplorerDriver(InternetExplorerDriverService, InternetExplorerOptions, TimeSpan)

Initializes a new instance of the InternetExplorerDriver class using the specified DriverService, InternetExplorerOptions, and command timeout.

public InternetExplorerDriver(InternetExplorerDriverService service, InternetExplorerOptions options, TimeSpan commandTimeout)

Parameters

service InternetExplorerDriverService

The InternetExplorerDriverService to use.

options InternetExplorerOptions

The InternetExplorerOptions used to initialize the driver.

commandTimeout TimeSpan

The maximum amount of time to wait for each command.

InternetExplorerDriver(InternetExplorerOptions)

Initializes a new instance of the InternetExplorerDriver class with the desired options.

public InternetExplorerDriver(InternetExplorerOptions options)

Parameters

options InternetExplorerOptions

The InternetExplorerOptions used to initialize the driver.

InternetExplorerDriver(string)

Initializes a new instance of the InternetExplorerDriver class using the specified path to the directory containing IEDriverServer.exe.

public InternetExplorerDriver(string internetExplorerDriverServerDirectory)

Parameters

internetExplorerDriverServerDirectory string

The full path to the directory containing IEDriverServer.exe.

InternetExplorerDriver(string, InternetExplorerOptions)

Initializes a new instance of the InternetExplorerDriver class using the specified path to the directory containing IEDriverServer.exe and options.

public InternetExplorerDriver(string internetExplorerDriverServerDirectory, InternetExplorerOptions options)

Parameters

internetExplorerDriverServerDirectory string

The full path to the directory containing IEDriverServer.exe.

options InternetExplorerOptions

The InternetExplorerOptions used to initialize the driver.

InternetExplorerDriver(string, InternetExplorerOptions, TimeSpan)

Initializes a new instance of the InternetExplorerDriver class using the specified path to the directory containing IEDriverServer.exe, options, and command timeout.

public InternetExplorerDriver(string internetExplorerDriverServerDirectory, InternetExplorerOptions options, TimeSpan commandTimeout)

Parameters

internetExplorerDriverServerDirectory string

The full path to the directory containing IEDriverServer.exe.

options InternetExplorerOptions

The InternetExplorerOptions used to initialize the driver.

commandTimeout TimeSpan

The maximum amount of time to wait for each command.

Properties

FileDetector

Gets or sets the IFileDetector responsible for detecting sequences of keystrokes representing file paths and names.

public override IFileDetector FileDetector { get; set; }

Property Value

IFileDetector

Remarks

The IE driver does not allow a file detector to be set, as the server component of the IE driver (IEDriverServer.exe) only allows uploads from the local computer environment. Attempting to set this property has no effect, but does not throw an exception. If you are attempting to run the IE driver remotely, use RemoteWebDriver in conjunction with a standalone WebDriver server.