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
1 Answer(s)

@crusaderDave, I believe the missing item is  this (at least this is what I have added and it means the tests run as expected).



add in 

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

cmjchrisjones Default Answered on September 29, 2016.
Add Comment

Your Answer

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