Interface DriverProvider
-
- All Known Implementing Classes:
DefaultDriverProvider
public interface DriverProvider
Classes that implement this interface are used by {org.openqa.selenium.remote.server.DriverFactory} to create new driver instances associated with specific set of capabilities. When a driver factory registers a driver provider it checks ability of the provider to create instances by a call to its isDriverAvailable method. Default driver provide implementation checks for presence of the driver class in the classpath. Other driver provider classes may perform more sophisticated verification. If the driver provides is verified successfully it is registered as the driver provider associated with the capabilities returned by getProvidedCapabilities method. Selenium Server trusts the driver providers, it does not check that a driver provider actually creates driver instances that have the specified capabilities.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canCreateDriverInstanceFor(org.openqa.selenium.Capabilities capabilities)
Checks if the provider can create driver instance with the desired capabilities.org.openqa.selenium.Capabilities
getProvidedCapabilities()
The provider "promises" that created driver instances will have (at least) this set of capabilities.org.openqa.selenium.WebDriver
newInstance(org.openqa.selenium.Capabilities capabilities)
Creates a new driver instance.
-
-
-
Method Detail
-
getProvidedCapabilities
org.openqa.selenium.Capabilities getProvidedCapabilities()
The provider "promises" that created driver instances will have (at least) this set of capabilities. The grid uses this information to match the capabilities requested by the client against the capabilities provided by all registered providers to pick the "best" one.- Returns:
- capabilities provided
-
canCreateDriverInstanceFor
boolean canCreateDriverInstanceFor(org.openqa.selenium.Capabilities capabilities)
Checks if the provider can create driver instance with the desired capabilities.- Parameters:
capabilities
- desired capabilities to check if the provider can create a driver instance- Returns:
- true if the provider can create driver instance with the desired capabilities.
-
newInstance
org.openqa.selenium.WebDriver newInstance(org.openqa.selenium.Capabilities capabilities)
Creates a new driver instance. The specified capabilities are to be passed to the driver constructor.- Parameters:
capabilities
- Capabilities are to be passed to the driver constructor.- Returns:
- A new driver instance
-
-