I want to initialize my WebDriver property that in my test class and when I want to use it in the scenario it is 'Null'.
In the example here, when I try to navigate to some url I get null exception.
Example:
[BeforeScenario]
private void BeforeScenario()
{
TestInitilaize();
}
[TestInitialize]
public void TestInitilaize()
{
InitializeTest();
}
protected virtual void InitializeTest()
{
WebDriver = new FirefoxDriver();
}
[Given(@"Some Given")]
public void GivenMethod()
{
WebDriver.Navigate().GoToUrl("www.someurl.com");
}