Package com.codeborne.selenide.webdriver
Class AbstractDriverFactory
java.lang.Object
com.codeborne.selenide.webdriver.AbstractDriverFactory
- All Implemented Interfaces:
DriverFactory
- Direct Known Subclasses:
AbstractChromiumDriverFactory,DefaultDriverFactory,FirefoxDriverFactory,HtmlUnitDriverFactory,InternetExplorerDriverFactory,SafariDriverFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> Tprotected ObjectConverts String to Boolean\Integer or returns original String.protected org.openqa.selenium.MutableCapabilitiescreateCommonCapabilities(Config config, Browser browser, @Nullable org.openqa.selenium.Proxy proxy) protected <T extends org.openqa.selenium.MutableCapabilities>
TcreateCommonCapabilities(T capabilities, Config config, Browser browser, @Nullable org.openqa.selenium.Proxy proxy) protected booleanprotected booleanprotected booleanprotected intmajorVersion(@Nullable String browserVersion) protected <T extends org.openqa.selenium.MutableCapabilities>
Tmerge(T capabilities, org.openqa.selenium.MutableCapabilities additionalCapabilities) protected voidsetTimezone(Config config, org.openqa.selenium.remote.service.DriverService.Builder<?, ?> dsBuilder) The browser inherits environment variables from the webdriver process, so the whole browser (all tabs, windows and workers) uses this timezone.protected @Nullable StringBrowsers silently fall back to UTC for an unknown timezone, so we fail fast on a typo.protected voidtransferCapabilitiesFromSystemProperties(org.openqa.selenium.MutableCapabilities currentBrowserCapabilities) protected FilewebdriverLog(Config config) protected <DS extends org.openqa.selenium.remote.service.DriverService,B extends org.openqa.selenium.remote.service.DriverService.Builder<DS, ?>>
DSMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.codeborne.selenide.webdriver.DriverFactory
create, createCapabilities, setBrowserPosition, setBrowserSize
-
Constructor Details
-
AbstractDriverFactory
public AbstractDriverFactory()
-
-
Method Details
-
webdriverLog
-
withLog
protected <DS extends org.openqa.selenium.remote.service.DriverService,B extends org.openqa.selenium.remote.service.DriverService.Builder<DS, DS withLog?>> (Config config, B dsBuilder) -
setTimezone
protected void setTimezone(Config config, org.openqa.selenium.remote.service.DriverService.Builder<?, ?> dsBuilder) The browser inherits environment variables from the webdriver process, so the whole browser (all tabs, windows and workers) uses this timezone. -
isWindows
protected boolean isWindows() -
createCommonCapabilities
-
createCommonCapabilities
-
timezone
Browsers silently fall back to UTC for an unknown timezone, so we fail fast on a typo.Only tz database IDs are accepted (e.g. "Europe/Tallinn", "UTC", "Etc/GMT-2"). Offset-style IDs like "GMT+02:00" are rejected: Java reads it as UTC+2, but
TZreads it as UTC-2. -
merge
protected <T extends org.openqa.selenium.MutableCapabilities> T merge(T capabilities, org.openqa.selenium.MutableCapabilities additionalCapabilities) -
transferCapabilitiesFromSystemProperties
protected void transferCapabilitiesFromSystemProperties(org.openqa.selenium.MutableCapabilities currentBrowserCapabilities) -
convertStringToNearestObjectType
Converts String to Boolean\Integer or returns original String.- Parameters:
value- string to convert- Returns:
- string's object representation
-
isInteger
-
isBoolean
-
majorVersion
-
cast
-