Browser Factory or WebDriver Factory Tutorial
Near the end of the Browser Factory or WebDriver Factory Tutorial (http://toolsqa.com/selenium-webdriver/c-sharp/browser-factory-or-webdriver-factory/), there is a code block titled “LogInTest TestCase”. Inside that code snippet there is a variable named “driver” used and I don’t see where it is coming from? There is no BaseTest it is inherited from? What am I missing?
I’m trying to implement the BrowserFactory and PageFactory patterns, but I’m not sure where the IWebDriver should come from that is passed into the Page constructor.
@crusaderDave, I believe the missing item is this (at least this is what I have added and it means the tests run as expected).
var driver = WebDriverFactory.Driver;
This will then give you the reference to the driver. Hope that helps
or, later on, if you review the page-generator walkthrough – then driver becomes obsolete in the tests