public abstract class WebDriverManager extends Object
| Modifier and Type | Field and Description |
|---|---|
protected CacheHandler |
cacheHandler |
protected Config |
config |
protected String |
downloadedDriverPath |
protected String |
downloadedDriverVersion |
protected Downloader |
downloader |
protected boolean |
forcedArch |
protected boolean |
forcedOs |
protected HttpClient |
httpClient |
protected static Map<DriverManagerType,WebDriverManager> |
instanceMap |
protected static String |
LATEST_RELEASE |
protected static org.slf4j.Logger |
log |
protected boolean |
mirrorLog |
protected ResolutionCache |
resolutionCache |
protected int |
retryCount |
protected static NamespaceContext |
S3_NAMESPACE_CONTEXT |
protected static String |
SLASH |
protected VersionDetector |
versionDetector |
| Constructor and Description |
|---|
WebDriverManager() |
protected static final org.slf4j.Logger log
protected static final String SLASH
protected static final String LATEST_RELEASE
protected static final NamespaceContext S3_NAMESPACE_CONTEXT
protected static Map<DriverManagerType,WebDriverManager> instanceMap
protected HttpClient httpClient
protected Downloader downloader
protected String downloadedDriverVersion
protected String downloadedDriverPath
protected boolean mirrorLog
protected boolean forcedArch
protected boolean forcedOs
protected int retryCount
protected Config config
protected ResolutionCache resolutionCache
protected CacheHandler cacheHandler
protected VersionDetector versionDetector
protected abstract List<URL> getDriverUrls() throws IOException
IOExceptionprotected abstract String getDriverName()
protected abstract String getDriverVersion()
protected abstract void setDriverVersion(String driverVersion)
protected abstract String getBrowserVersion()
protected abstract void setBrowserVersion(String browserVersion)
protected abstract void setDriverUrl(URL url)
protected abstract URL getDriverUrl()
public abstract DriverManagerType getDriverManagerType()
public static Config globalConfig()
public Config config()
public static WebDriverManager chromedriver()
public static WebDriverManager chromiumdriver()
public static WebDriverManager firefoxdriver()
public static WebDriverManager operadriver()
public static WebDriverManager edgedriver()
public static WebDriverManager iedriver()
public static WebDriverManager phantomjs()
public static WebDriverManager seleniumServerStandalone()
protected static WebDriverManager voiddriver()
public static WebDriverManager getInstance(DriverManagerType driverManagerType)
public static WebDriverManager getInstance(Class<?> webDriverClass)
public void setup()
public WebDriverManager driverVersion(String driverVersion)
public WebDriverManager browserVersion(String browserVersion)
public WebDriverManager architecture(Architecture architecture)
public WebDriverManager arch32()
public WebDriverManager arch64()
public WebDriverManager win()
public WebDriverManager linux()
public WebDriverManager mac()
public WebDriverManager operatingSystem(OperatingSystem os)
public WebDriverManager forceDownload()
public WebDriverManager driverRepositoryUrl(URL url)
public WebDriverManager useMirror()
public WebDriverManager proxy(String proxy)
public WebDriverManager proxyUser(String proxyUser)
public WebDriverManager proxyPass(String proxyPass)
public WebDriverManager useBetaVersions()
public WebDriverManager ignoreDriverVersions(String... driverVersions)
public WebDriverManager gitHubTokenSecret(String gitHubTokenSecret)
public WebDriverManager gitHubTokenName(String gitHubTokenName)
public WebDriverManager localRepositoryUser(String localRepositoryUser)
public WebDriverManager localRepositoryPassword(String localRepositoryPassword)
public WebDriverManager timeout(int timeout)
public WebDriverManager properties(String properties)
public WebDriverManager cachePath(String cachePath)
public WebDriverManager resolutionCachePath(String resolutionCachePath)
public WebDriverManager avoidExport()
public WebDriverManager avoidOutputTree()
public WebDriverManager avoidBrowserDetection()
public WebDriverManager avoidResolutionCache()
public WebDriverManager avoidFallback()
public WebDriverManager avoidReadReleaseFromRepository()
public WebDriverManager ttl(int seconds)
public WebDriverManager ttlBrowsers(int seconds)
public WebDriverManager browserPath(String browserPath)
public WebDriverManager useLocalVersionsPropertiesFirst()
public WebDriverManager clearResolutionCache()
public WebDriverManager clearDriverCache()
public String getDownloadedDriverPath()
public String getDownloadedDriverVersion()
protected void manage(String driverVersion)
protected void initResolutionCache()
protected String download(String driverVersion) throws IOException
IOExceptionprotected void exportDriver(String variableValue)
protected void storeInResolutionCache(String preferenceKey, String resolvedDriverVersion, String resolvedBrowserVersion)
protected Optional<String> getValueFromResolutionCache(String preferenceKey)
protected boolean useResolutionCacheWithKey(String key)
protected boolean useResolutionCache()
protected boolean isUnknown(String driverVersion)
protected UrlHandler createUrlHandler(String driverVersion) throws IOException
IOExceptionprotected List<URL> getDriversFromMirror(URL driverUrl) throws IOException
IOExceptionprotected NamespaceContext getNamespaceContext()
protected Optional<NamespaceContext> getS3NamespaceContext()
protected List<URL> getDriversFromXml(URL driverUrl, String xpath, Optional<NamespaceContext> namespaceContext) throws IOException
IOExceptionprotected void logSeekRepo(URL driverUrl)
protected Document loadXML(InputStream inputStream) throws SAXException, IOException, ParserConfigurationException
protected InputStream openGitHubConnection(URL driverUrl) throws IOException
IOExceptionprotected List<URL> getDriversFromGitHub() throws IOException
IOExceptionprotected List<URL> getDriversFromBitBucket() throws IOException
IOExceptionprotected HttpClient getHttpClient()
protected FilenameFilter getFolderFilter()
protected Charset getVersionCharset()
protected String getLatestVersionLabel()
protected Optional<String> getDriverVersionFromRepository(Optional<String> driverVersion)
protected void reset()
protected String getProgramFilesEnv()
protected String getOtherProgramFilesEnv()
protected static void startServer(String[] args)
protected static void logCliError(String validBrowsers)
protected void setConfig(Config config)
protected Optional<String> getLatestDriverVersionFromRepository()
protected String getShortDriverName()
protected String getKeyForResolutionCache()
public static void main(String[] args)
Copyright © 2021. All rights reserved.