Modifier and Type | Method and Description |
---|---|
java.util.Optional<WebDriver> |
createDriver(Capabilities capabilities)
Creates a new instance of the
WebDriver implementation. |
Capabilities |
getCanonicalCapabilities()
Describes the smallest set of
Capabilities that could be used to create an instance of
this WebDriver implementation. |
java.lang.String |
getDisplayName() |
int |
getMaximumSimultaneousSessions()
Some browsers require all the resources of the current system in order to run (for example,
Safari on iOS) and so do not support multiple simultaneous sessions on the same system.
|
boolean |
isAvailable()
Often, a
WebDriver instance needs one or more supporting files or executables to be
present (such as a vendor-provided executable which speaks the WebDriver Protocol). |
boolean |
isSupporting(Capabilities capabilities) |
java.lang.String getDisplayName()
Capabilities getCanonicalCapabilities()
Capabilities
that could be used to create an instance of
this WebDriver
implementation.
Note, this set does not need to be exhaustive: the only requirement is that if
isAvailable()
returns true
, the returned Capabilities
can be passed to
createDriver(Capabilities)
and a session will be created.
Capabilities
required to create an instance of this
WebDriver
implementation.boolean isSupporting(Capabilities capabilities)
createDriver(Capabilities)
would succeed if given
capabilities
.boolean isAvailable()
WebDriver
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.WebDriver
are present.int getMaximumSimultaneousSessions()
WebDriver
instance.
The count of simultaneous sessions is typically 1, some multiple of the available number of
cores, or Integer.MAX_VALUE
if the number is unbounded or no-one cares.
java.util.Optional<WebDriver> createDriver(Capabilities capabilities) throws SessionNotCreatedException
WebDriver
implementation. The instance must be killed by
sending the "quit" command. If the instance cannot be created because isAvailable()
is
false
, then Optional.empty()
is returned. Otherwise, an attempt to start the
session is made and the result returned.SessionNotCreatedException