public abstract class WebDriverManager extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
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 final String IN_DOCKER
protected static final String CLI_SERVER
protected static final String CLI_RESOLVER
protected static final String CLI_DOCKER
protected static final String BROWSER_WATCHER_ID
protected Config config
protected HttpClient httpClient
protected Downloader downloader
protected ResolutionCache resolutionCache
protected CacheHandler cacheHandler
protected VersionDetector versionDetector
protected WebDriverCreator webDriverCreator
protected DockerService dockerService
protected int retryCount
protected org.openqa.selenium.Capabilities capabilities
protected boolean shutdownHook
protected boolean dockerEnabled
protected boolean androidEnabled
protected boolean watchEnabled
protected boolean displayEnabled
protected boolean disableCsp
protected boolean isHeadless
protected List<WebDriverBrowser> webDriverList
protected String resolvedBrowserVersion
protected String downloadedDriverVersion
protected String downloadedDriverPath
protected abstract List<URL> getDriverUrls(String driverVersion) 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 abstract WebDriverManager exportParameter(String exportParameter)
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 safaridriver()
protected static WebDriverManager voiddriver()
public static WebDriverManager getInstance(DriverManagerType driverManagerType)
public static WebDriverManager getInstance(String browserName)
public static WebDriverManager getInstance(Class<? extends org.openqa.selenium.WebDriver> webDriverClass)
protected static WebDriverManager getDriver(String webDriverClass)
public static WebDriverManager getInstance()
public static boolean isDockerAvailable()
public static boolean isOnline(String url)
public static boolean isOnline(URL url)
public void setup()
public org.openqa.selenium.WebDriver create()
public List<org.openqa.selenium.WebDriver> create(int numberOfBrowser)
public WebDriverManager browserInDocker()
protected boolean isUsingDocker()
public WebDriverManager browserInDockerAndroid()
public WebDriverManager dockerDaemonUrl(String daemonUrl)
public WebDriverManager dockerNetwork(String network)
public WebDriverManager dockerTimezone(String timezone)
public WebDriverManager dockerLang(String lang)
public WebDriverManager dockerShmSize(String size)
public WebDriverManager dockerTmpfsSize(String size)
public WebDriverManager dockerTmpfsMount(String mount)
public WebDriverManager dockerVolumes(String... volumes)
public WebDriverManager dockerExtraHosts(String... hosts)
public WebDriverManager dockerScreenResolution(String screenResolution)
public WebDriverManager dockerRecordingFrameRate(int frameRate)
public WebDriverManager avoidDockerLocalFallback()
public WebDriverManager avoidShutdownHook()
public WebDriverManager enableVnc()
public WebDriverManager viewOnly()
public WebDriverManager enableRecording()
public WebDriverManager dockerRecordingPrefix(String prefix)
@Deprecated public WebDriverManager recordingPrefix(String prefix)
dockerRecordingPrefix(String)public WebDriverManager dockerRecordingOutput(String path)
public WebDriverManager dockerRecordingOutput(Path path)
@Deprecated public WebDriverManager recordingOutput(String path)
dockerRecordingOutput(String)@Deprecated public WebDriverManager recordingOutput(Path path)
dockerRecordingOutput(String)public WebDriverManager dockerPrivateEndpoint(String endpoint)
public WebDriverManager dockerStopTimeoutSec(Integer timeout)
public WebDriverManager watch()
public WebDriverManager watchAndDisplay()
public WebDriverManager disableCsp()
public WebDriverManager capabilities(org.openqa.selenium.Capabilities capabilities)
public WebDriverManager remoteAddress(String remoteAddress)
public WebDriverManager remoteAddress(URL remoteAddress)
public WebDriverManager dockerCustomImage(String dockerImage)
@Deprecated public WebDriverManager dockerImage(String dockerImage)
dockerCustomImage(String)public WebDriverManager driverVersion(String driverVersion)
public WebDriverManager browserVersion(String browserVersion)
public WebDriverManager architecture(Architecture architecture)
public WebDriverManager arch32()
public WebDriverManager arch64()
public WebDriverManager arm64()
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 gitHubToken(String gitHubToken)
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 avoidTmpFolder()
public WebDriverManager avoidUseChromiumDriverSnap()
public WebDriverManager ttl(int seconds)
public WebDriverManager ttlBrowsers(int seconds)
public WebDriverManager browserVersionDetectionCommand(String browserVersionCommand)
public WebDriverManager useLocalVersionsPropertiesFirst()
public WebDriverManager useLocalCommandsPropertiesFirst()
public WebDriverManager versionsPropertiesUrl(URL url)
public WebDriverManager commandsPropertiesUrl(URL url)
public WebDriverManager clearResolutionCache()
public WebDriverManager clearDriverCache()
public WebDriverManager browserVersionDetectionRegex(String regex)
public void reset()
public String getDownloadedDriverPath()
public String getDownloadedDriverVersion()
public org.openqa.selenium.WebDriver getWebDriver()
public List<org.openqa.selenium.WebDriver> getWebDriverList()
public void quit()
public void quit(org.openqa.selenium.WebDriver driver)
public void stopDockerRecording()
public void stopDockerRecording(org.openqa.selenium.WebDriver driver)
protected void stopDockerRecording(WebDriverBrowser driverBrowser)
protected void quit(WebDriverBrowser driverBrowser)
public String getDockerBrowserContainerId(org.openqa.selenium.WebDriver driver)
public String getDockerBrowserContainerId()
public URL getDockerSeleniumServerUrl(org.openqa.selenium.WebDriver driver)
public URL getDockerSeleniumServerUrl()
public URL getDockerNoVncUrl(org.openqa.selenium.WebDriver driver)
public URL getDockerNoVncUrl()
public String getDockerVncUrl(org.openqa.selenium.WebDriver driver)
public String getDockerVncUrl()
public Path getDockerRecordingPath(org.openqa.selenium.WebDriver driver)
public Path getDockerRecordingPath()
public void startRecording(org.openqa.selenium.WebDriver driver)
public void startRecording()
public void startRecording(org.openqa.selenium.WebDriver driver,
String recordingName)
public void startRecording(String recordingName)
public void stopRecording(org.openqa.selenium.WebDriver driver)
public void stopRecording()
public DockerService getDockerService()
public WebDriverManager exportParameter(DriverManagerType driverManagerType)
protected Object getPropertyFromWebDriverBrowser(org.openqa.selenium.WebDriver driver, Function<WebDriverBrowser,Object> function)
protected Optional<WebDriverBrowser> findWebDriverBrowser(org.openqa.selenium.WebDriver driver)
protected Object getPropertyFromFirstWebDriverBrowser(Function<WebDriverBrowser,Object> function)
protected void manage(String driverVersion)
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 boolean isUseMirror()
protected UrlHandler createUrlHandler(String driverVersion) throws IOException
IOExceptionprotected List<URL> getDriversFromMirror(URL driverUrl, String driverVersion) 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(String driverVersion) throws IOException
IOExceptionprotected HttpClient getHttpClient()
protected ResolutionCache getResolutionCache()
protected VersionDetector getVersionDetector()
protected WebDriverCreator getWebDriverCreator()
protected FilenameFilter getFolderFilter()
protected Charset getVersionCharset()
protected String getLatestVersionLabel()
protected Optional<String> getDriverVersionFromRepository(Optional<String> driverVersion)
protected Optional<String> getLatestDriverVersionFromRepository()
protected String getShortDriverName()
protected String getKeyForResolutionCache()
protected org.openqa.selenium.WebDriver instantiateDriver()
protected void initBrowserWatcherForChromium(Path extensionPath, org.openqa.selenium.Capabilities caps)
protected Path getBrowserWatcherAsPath() throws IOException
IOExceptionprotected org.openqa.selenium.Capabilities getMergedCapabilities()
protected void addShutdownHookIfRequired()
protected org.openqa.selenium.WebDriver createDockerWebDriver()
protected org.openqa.selenium.WebDriver createLocalWebDriver()
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchMethodException
protected org.openqa.selenium.Capabilities getCapabilities()
protected void addDefaultArgumentsForDocker(org.openqa.selenium.Capabilities options)
throws IllegalAccessException,
IllegalArgumentException,
InvocationTargetException,
NoSuchMethodException,
SecurityException
protected static void logCliError(String browserForResolving, String browserForDocker, int port)
protected static void startServer(String[] args, int port)
public static void main(String[] args)
Copyright © 2022. All rights reserved.