docs: protected static File findPhantomJS(Capabilities desiredCapabilities, String docsLink,
                                          String downloadLink) {
          String phantomjspath;
          if (desiredCapabilities != null &&
                  desiredCapabilities.getCapability(PHANTOMJS_EXECUTABLE_PATH_PROPERTY) != null) {
              phantomjspath = (String) desiredCapabilities.getCapability(PHANTOMJS_EXECUTABLE_PATH_PROPERTY);
          } else {
              phantomjspath = new ExecutableFinder().find(PHANTOMJS_DEFAULT_EXECUTABLE);
              phantomjspath = System.getProperty(PHANTOMJS_EXECUTABLE_PATH_PROPERTY, phantomjspath);
          }
  
          checkState(phantomjspath != null,
                  "The path to the driver executable must be set by the %s capability/system property/PATH variable;"
                          + " for more information, see %s. "
                          + "The latest version can be downloaded from %s",
                  PHANTOMJS_EXECUTABLE_PATH_PROPERTY,
                  docsLink,
                  downloadLink);
  
          File phantomjs = new File(phantomjspath);
          checkExecutable(phantomjs);
          return phantomjs;
      }