code: private WebDriver generateGoogleChromeDriver() throws TechnicalException {
          final String pathWebdriver = DriverFactory.getPath(Driver.CHROME);
          if (!new File(pathWebdriver).setExecutable(true)) {
              throw new TechnicalException(Messages.getMessage(TechnicalException.TECHNICAL_ERROR_MESSAGE_WEBDRIVER_SET_EXECUTABLE));
          }
          logger.info("Generating Chrome driver ({}) ...", pathWebdriver);
  
          System.setProperty(Driver.CHROME.getDriverName(), pathWebdriver);
  
          final ChromeOptions chromeOptions = new ChromeOptions();
          final DesiredCapabilities capabilities = DesiredCapabilities.chrome();
          capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);
          capabilities.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.ACCEPT);
  
          setLoggingLevel(capabilities);
  
          if (Context.isHeadless()) {
              chromeOptions.addArguments("--headless");
          }
  
          // Proxy configuration
          if (Context.getProxy().getProxyType() != ProxyType.UNSPECIFIED && Context.getProxy().getProxyType() != ProxyType.AUTODETECT) {
              capabilities.setCapability(CapabilityType.PROXY, Context.getProxy());
          }
  
          setChromeOptions(capabilities, chromeOptions);
  
          final String withWhitelistedIps = Context.getWebdriversProperties("withWhitelistedIps");
          if (withWhitelistedIps != null && !"".equals(withWhitelistedIps)) {
              final ChromeDriverService service = new ChromeDriverService.Builder().withWhitelistedIps(withWhitelistedIps).withVerbose(false).build();
              return new ChromeDriver(service, capabilities);
          } else {
              return new ChromeDriver(capabilities);
          }
      }
docs: Generates a chrome webdriver.
  
  @return
  A chrome webdriver
  @throws TechnicalException
  if an error occured when Webdriver setExecutable to true.