@Immutable public class BrowserConfiguration extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
BROWSER_SLEEP_FAILURE
The number of milliseconds to sleep when a browser can not be created.
|
static int |
BROWSER_START_RETRIES
The total number of retries when a browser can not be created.
|
| Constructor and Description |
|---|
BrowserConfiguration(EmbeddedBrowser.BrowserType browsertype)
This configuration will start one browser of the selected type.
|
BrowserConfiguration(EmbeddedBrowser.BrowserType browsertype,
int numberOfBrowsers) |
BrowserConfiguration(EmbeddedBrowser.BrowserType browsertype,
int numberOfBrowsers,
javax.inject.Provider<EmbeddedBrowser> builder) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
javax.inject.Provider<EmbeddedBrowser> |
getBrowserBuilder() |
EmbeddedBrowser.BrowserType |
getBrowsertype() |
String |
getLangOrNull() |
int |
getNumberOfBrowsers() |
String |
getRemoteHubUrl() |
int |
hashCode() |
boolean |
isDefaultBuilder() |
static BrowserConfiguration |
remoteConfig(int numberOfBrowsers,
String remoteUrl) |
void |
setLang(String lang) |
String |
toString() |
public static final int BROWSER_START_RETRIES
public static final long BROWSER_SLEEP_FAILURE
public BrowserConfiguration(EmbeddedBrowser.BrowserType browsertype)
browsertype - The browser you would like to run.public BrowserConfiguration(EmbeddedBrowser.BrowserType browsertype, int numberOfBrowsers)
browsertype - The browser you'd like to use.numberOfBrowsers - The number of browsers you'd like to use. They will be started as soon as the
crawl starts.public BrowserConfiguration(EmbeddedBrowser.BrowserType browsertype, int numberOfBrowsers, javax.inject.Provider<EmbeddedBrowser> builder)
browsertype - The browser you'd like to use.numberOfBrowsers - The number of browsers you'd like to use. They will be started as soon as the
crawl starts.builder - a custom WebDriverBrowserBuilder.public static BrowserConfiguration remoteConfig(int numberOfBrowsers, String remoteUrl)
numberOfBrowsers - The number of browsers you'd like to use. They will be started as soon as the
crawl starts.remoteUrl - the URL of the remote HUBpublic EmbeddedBrowser.BrowserType getBrowsertype()
public int getNumberOfBrowsers()
public javax.inject.Provider<EmbeddedBrowser> getBrowserBuilder()
public String getRemoteHubUrl()
public boolean isDefaultBuilder()
public String getLangOrNull()
null if not set.public void setLang(String lang)
lang - the language header in http requestsCopyright © 2007-2013. All Rights Reserved.