I understand that this is a little late, but may be useful for future readers.
I created a base class containing a firefox driver with the following and it works fine for me. Then you can just refer to the base class (Driver in this instance) from your derived test class. It is worth noting that I use C # and Nunit.
Code for base class:
namespace yournamespace { public class Driver { public IWebDriver driver; public StringBuilder verificationErrors; public Driver() { driver = new FirefoxDriver();
Then the Driver class from my test class is simply called:
[TestFixture] public class IMSLogin : Driver {
source share