
Untitled
By: a guest on
Apr 24th, 2012 | syntax:
None | size: 0.67 KB | hits: 7 | expires: Never
NUnit Selenium Structure
[TestFixture]
public class SomeTest
{
IWebDriver driver;
[Setup]
public void Setup()
{
driver = new InternetExplorerDriver();
}
[Test]
public void Test1()
{
}
[Test]
public void Test2()
{
}
[Teardown]
public void Teardown()
{
driver.Close();
}
}
[TestFixture]
public class SomeTest
{
IWebDriver driver;
[TestFixtureSetup]
public void Setup()
{
driver = new InternetExplorerDriver();
}
[Test]
public void Test1()
{
}
[Test]
public void Test2()
{
}
[TestFixtureTeardown]
public void Teardown()
{
driver.Close();
}
}