I have a grid hub running with some nodes, the grid URL is stored in a c# project App.Config file. My App.Config also specifies which browser to use to run tests against. In a WebDriver factory class I create a new instance of RemoteWebDriver pointing to the grid URL with the proper browser and capabilities.
My question is, what if I want to run my tests locally and bypass the grid sometimes for debugging purposes or whatever, I can specify an additional App.Config key, say Local = true or false, if set to true, don't use RemoteWebDriver. Is there an elegant way to provide this functionality? Can remotewebdriver run tests locally without using the grid? I want to avoid having to create additional factories and check whether the user requested a local run. Has anyone implemented something similar?