Class SafariDriver
Provides a way to access Safari to run your tests by creating a SafariDriver instance
public class SafariDriver : RemoteWebDriver, IWebDriver, IDisposable, ISearchContext, IJavaScriptExecutor, IFindsById, IFindsByClassName, IFindsByLinkText, IFindsByName, IFindsByTagName, IFindsByXPath, IFindsByPartialLinkText, IFindsByCssSelector, IHasInputDevices, IHasCapabilities, IAllowsFileDetection
- Inheritance
-
SafariDriver
- Implements
- Inherited Members
Examples
[TestFixture]
public class Testing
{
private IWebDriver driver;
[SetUp]
public void SetUp()
{
driver = new SafariDriver();
}
[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
SafariDriver()
Initializes a new instance of the SafariDriver class.
public SafariDriver()
Methods
StartClient()
Starts the command executor, enabling communication with the browser.
protected override void StartClient()
StopClient()
Stops the command executor, ending further communication with the browser.
protected override void StopClient()