I had created a simple program to run selenium in chrome driver session but it does not open any browser like in Java does. Im execute the test via Test Explorer window in Visual Studio. How to run this test by NUnit?
Please help. Thanks.
namespace Automation_Framework.TestManager
{
[TestFixture]
class ChromeTestManager
{
private WebDriverManager webDriverManager;
private IWebDriver driver;
public ChromeTestManager()
{
webDriverManager = new WebDriverManager();
}
[SetUp]
public void setup()
{
webDriverManager.createDriver("chrome");
driver = webDriverManager.getDriver();
}
[Test]
public void test()
{
driver.Url = "http://www.google.com.my";
driver.Navigate().GoToUrl("http://www.google.com.my");
}
[TearDown]
public void shutdown()
{
driver.Close();
}
}
}
I am currently run the test inside main but it does not have the full life cycle of test fixture. How to run it with full life cycle of the test fixture?
