Extracted web driver creation logic into WebDriverFactory and added test coverage.