public static String getPath ( Driver currentDriver ) { final OperatingSystem currentOperatingSystem = OperatingSystem . getCurrentOperatingSystem ( ) ; String format = "" ; if ( "webdriver.ie.driver" . equals ( currentDriver . driverName ) ) { format = Utilities . setProperty ( Context . getWebdriversProperties ( currentDriver . driverName ) , "src/test/resources/drivers/%s/internetexplorer/%s/IEDriverServer%s" ) ; } else if ( "webdriver.chrome.driver" . equals ( currentDriver . driverName ) ) { format = Utilities . setProperty ( Context . getWebdriversProperties ( currentDriver . driverName ) , "src/test/resources/drivers/%s/googlechrome/%s/chromedriver%s" ) ; } else if ( "webdriver.gecko.driver" . equals ( currentDriver . driverName ) ) { format = Utilities . setProperty ( Context . getWebdriversProperties ( currentDriver . driverName ) , "src/test/resources/drivers/%s/firefox/%s/geckodriver%s" ) ; } return String . format ( format , currentOperatingSystem . getOperatingSystemDir ( ) , SystemArchitecture . getCurrentSystemArchitecture ( ) . getSystemArchitectureName ( ) , currentOperatingSystem . getSuffixBinary ( ) ) ; }
Get the path of the driver given in parameters .