public final class GeckoDriverBinaryProvider extends Object implements BinaryProvider
BinaryProvider for Mozilla's GeckoDriver.| Constructor and Description |
|---|
GeckoDriverBinaryProvider(org.apache.http.client.HttpClient httpClient) |
| Modifier and Type | Method and Description |
|---|---|
File |
download(String version,
Os os,
Architecture architecture,
Path binaryDestinationPath)
Download the binary in a given version for a given
Os and Architecture. |
boolean |
equals(Object otherObject) |
Optional<String> |
getLatestBinaryVersion(Os os,
Architecture architecture)
Get the latest available binary version for a given
Os and Architecture. |
int |
hashCode() |
boolean |
providesBinaryForBrowser(Browser browser)
Indicate whether or not binaries can be provided for a given
Browser. |
public GeckoDriverBinaryProvider(org.apache.http.client.HttpClient httpClient)
public boolean providesBinaryForBrowser(Browser browser)
Browser.providesBinaryForBrowser in interface BinaryProviderbrowser - The Browser to check the support forfalse for every Browser except Browser.FIREFOX,
in which case true is returned@Nonnull public Optional<String> getLatestBinaryVersion(Os os, Architecture architecture) throws IOException
Os and Architecture.
Note that the returned version will be normalized, which means v0.19.0 becomes 0.19.0.
Due to this, the version returned here is technically not exactly the same as on GitHub's releases page.
getLatestBinaryVersion in interface BinaryProvideros - The Os to get the latest binary version forarchitecture - The Architecture to get the latest binary version forOptional.empty(),
when there is no version availableIOException - In case of a networking error@Nonnull public File download(String version, Os os, Architecture architecture, Path binaryDestinationPath) throws IOException
Os and Architecture.download in interface BinaryProviderversion - The desired versionos - The Os to get the binary forarchitecture - The Architecture to get the binary forbinaryDestinationPath - The destination Path the binary shall be deployed toUnsupportedOperationException - When the requested Os / Architecture combination is not supportedNoSuchElementException - When no binary for the requested criteria was foundIOException - In case of a networking errorCopyright © 2019. All rights reserved.