code: public static WebDriver getWebDriver(String browserProperties, URL remoteUrl) throws IOException {
          URL resource = Thread.currentThread().getContextClassLoader().getResource(browserProperties);
  
          log.debug("File: {} " + (resource != null ? "exists" : "does not exist"), browserProperties);
  
          if (resource != null) {
              Browser browser = findBrowser(resource.openStream());
              return getDriver(browser, resource.openStream(), remoteUrl);
          }
          return null;
      }
docs: Create and return new WebDriver or RemoteWebDriver based on properties file
  
  @param browserProperties path to browser.properties
  @param remoteUrl         url
  @return WebDriver
  @throws IOException exception