RE: Browser Factory or WebDriver Factory Tutorial

Near the end of the Browser Factory or WebDriver Factory Tutorial (, 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 Default Asked on August 24, 2016 in Selenium WebDriver.
Add Comment
3 Answers

Forgive me if it is incorrect to ask follow up questions, but I have a problem with this tutorial as well.

Whenever I run the logintest I am always presented with the exception (“The WebDriver browser instance was not initialized”)…

LoginTest calls InitBrowser, which checks if Driver is Null – Attempts to get Driver which checks if _driver is Null, which it always will be… and then throws the exception. ┬áHave I misunderstood, or is there an error in the tutorial?

Default Answered on November 15, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.