public static FileDetector fileDetector() { return new FileDetector() { @Override public File getLocalFile(CharSequence... keys) { return null; } }; }
public void setFileDetector(final FileDetector detector) { if (detector == null) { throw new WebDriverException("file detector is null"); } fileDetector = detector; }
@Override public T createDriver() { T remoteWebDriver = constr.apply(url, capabilities); FileDetector fd = remoteWebDriver.getFileDetector(); if (fd == null || fd instanceof UselessFileDetector) { remoteWebDriver.setFileDetector(new LocalFileDetector()); } Environment.getInstance().setSymbol(REMOTE_URL_KEY, url.toString()); return remoteWebDriver; }
@Override public void setFileDetector(FileDetector detector) { throw new WebDriverException( "Setting the file detector only works on remote webdriver instances obtained " + "via RemoteWebDriver"); }
@Override public void setFileDetector(FileDetector detector) { throw new WebDriverException("Setting the file detector only works on remote webdriver instances obtained via RemoteWebDriver"); }
public FileDetector getFileDetector() { return fileDetector; }