Package org.openqa.selenium.chrome
Class ChromeDriverInfo
java.lang.Object
org.openqa.selenium.chromium.ChromiumDriverInfo
org.openqa.selenium.chrome.ChromeDriverInfo
- All Implemented Interfaces:
WebDriverInfo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateDriver
(Capabilities capabilities) Creates a new instance of theWebDriver
implementation.Describes the smallest set ofCapabilities
that could be used to create an instance of thisWebDriver
implementation.boolean
Often, aWebDriver
instance needs one or more supporting files or executables to be present (such as a vendor-provided executable which speaks the WebDriver Protocol).boolean
Checks whether the browser driver is already present on the host machine.boolean
isSupporting
(Capabilities capabilities) boolean
boolean
Methods inherited from class org.openqa.selenium.chromium.ChromiumDriverInfo
getMaximumSimultaneousSessions
-
Constructor Details
-
ChromeDriverInfo
public ChromeDriverInfo()
-
-
Method Details
-
getDisplayName
- Returns:
- A human-readable name that describes the browser.
-
getCanonicalCapabilities
Description copied from interface:WebDriverInfo
Describes the smallest set ofCapabilities
that could be used to create an instance of thisWebDriver
implementation.Note, this set does not need to be exhaustive: the only requirement is that if
WebDriverInfo.isAvailable()
returnstrue
, the returnedCapabilities
can be passed toWebDriverInfo.createDriver(Capabilities)
and a session will be created.- Returns:
- The smallest set of
Capabilities
required to create an instance of thisWebDriver
implementation.
-
isSupporting
- Returns:
- Whether a call to
WebDriverInfo.createDriver(Capabilities)
would succeed if givencapabilities
.
-
isSupportingCdp
public boolean isSupportingCdp()- Returns:
- Whether the driver has enabled the CDP interface.
-
isSupportingBiDi
public boolean isSupportingBiDi()- Returns:
- Whether the driver has enabled the BiDi interface.
-
isAvailable
public boolean isAvailable()Description copied from interface:WebDriverInfo
Often, aWebDriver
instance needs one or more supporting files or executables to be present (such as a vendor-provided executable which speaks the WebDriver Protocol). This means that even though the driver classes might be present in Java, it would make no sense to attempt to instantiate the driver itself.- Returns:
- Whether the prerequisites required for this
WebDriver
are present.
-
isPresent
public boolean isPresent()Description copied from interface:WebDriverInfo
Checks whether the browser driver is already present on the host machine. Different fromWebDriverInfo.isAvailable()
which uses Selenium Manager to obtain the driver when not present.- Returns:
- Whether the browser driver is present on the host machine.
-
createDriver
public Optional<WebDriver> createDriver(Capabilities capabilities) throws SessionNotCreatedException Description copied from interface:WebDriverInfo
Creates a new instance of theWebDriver
implementation. The instance must be killed by sending the "quit" command. If the instance cannot be created becauseWebDriverInfo.isAvailable()
isfalse
, thenOptional.empty()
is returned. Otherwise, an attempt to start the session is made and the result returned.- Throws:
SessionNotCreatedException
-