try {
File file = new File(Config.chrome_webdriver_location);
ChromeDriverService service = new ChromeDriverService.Builder()
.usingChromeDriverExecutable(file)
.usingAnyFreePort().build();
service.start();
WebDriver instance = new ChromeDriver(service, DesiredCapabilities.chrome());
log.info("Found webdriver instance : " + instance);
return instance;
} catch (IOException e) {
e.printStackTrace();