public WebDriver getDriver ( ) { // Driver's name is retrieved by system properties String driverName = Context . getBrowser ( ) ; driverName = driverName != null ? driverName : DEFAULT_DRIVER ; WebDriver driver = null ; if ( ! drivers . containsKey ( driverName ) ) { try { driver = generateWebDriver ( driverName ) ; } catch ( final TechnicalException e ) { logger . error ( "error DriverFactory.getDriver()" , e ) ; } } else { driver = drivers . get ( driverName ) ; } return driver ; }
Get selenium driver . Drivers are lazy loaded .