public class RunConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AUTO_POSITION_PATH |
static String |
COLLECT_STATISTICS_PATH |
static String |
DISABLED_CONTENT_TYPE_RELPATH |
static String |
DISABLED_CONTENT_TYPES_PATH |
static String |
DISABLED_THIRDPARTY_CONTENT_TYPE_RELPATH |
static String |
DISABLED_THIRDPARTY_CONTENT_TYPES_PATH |
static String |
DISPLAY_NUMBER_PATH |
static String |
ENABLE_PLUGINS_PATH |
static String |
HEIGHT_PATH |
static String |
LATITUDE_PATH |
static String |
LONGITUDE_PATH |
static String |
PAGE_LOAD_SEC_PATH |
static String |
PATH_SEPARATOR |
static String |
SCRIPT_TIMEOUT_SEC_PATH |
static String |
TOP_LEFT_X_PATH |
static String |
TOP_LEFT_Y_PATH |
static String |
USE_DEFAULT_EXECUTABLES_PATH |
static String |
USE_XVFB_PATH |
static String |
USER_AGENT_PATH |
static String |
USER_EXECUTABLE_PATH |
static String |
WIDTH_PATH |
Constructor and Description |
---|
RunConfiguration(ConfigurationObject config) |
Modifier and Type | Method and Description |
---|---|
RunConfiguration |
doNotLoadAnyThirdPartyContent()
Shortcut for
#setDisabledThirdPartyContentTypes(WebBrowser.ContentType.values()) |
boolean |
getAutoPosition()
Auto-position flag for positioning window on screen.
|
int |
getBrowserHeight() |
int |
getBrowserWidth() |
boolean |
getCollectStatistics()
"Collect statistics" attribute.
|
List<WebBrowser.ContentType> |
getDisabledContentTypes()
Content types (see WebBrowser.ContentType) to be disabled.
|
List<WebBrowser.ContentType> |
getDisabledThirdPartyContentTypes()
Content types (see WebBrowser.ContentType) of third-party web pages to be disabled.
|
String |
getDisplayNumber()
Display number for the XVFB mode enabled.
|
boolean |
getEnablePlugins()
"Enable plug-ins" flag.
|
WebDriverBrowserImpl.GeoLocation |
getGeoLocation()
Geolocation.
|
int |
getPageLoadTimeoutSec() |
int |
getPositionXMin()
Leftmost coordinates of the browser window.
|
int |
getPositionYMin()
Topmost coordinates of the browser window.
|
int |
getScriptTimeoutSec() |
boolean |
getUseDefaultExecutables()
Use default browser executables (binaries).
|
String |
getUserAgent()
User-Agent HTTP parameter.
|
String |
getUserExecutable()
User-provided browser executables (binaries).
|
boolean |
getXvfbMode()
XVFB Mode.
|
RunConfiguration |
loadOnlyRawHtml()
This is a shortcut for the invocation
#setDisabledContentTypes(WebBrowser.ContentType.values())) . |
RunConfiguration |
setAutoPosition(boolean autoPosition)
Auto-position flag for positioning window on screen.
|
RunConfiguration |
setBrowserHeight(int height) |
RunConfiguration |
setBrowserWidth(int width) |
RunConfiguration |
setCollectStatistics(boolean collectStats)
"Collect statistics" attribute.
|
RunConfiguration |
setDisabledContentTypes(Collection<WebBrowser.ContentType> contypes)
Content types (see WebBrowser.ContentType) to be disabled.
|
RunConfiguration |
setDisabledContentTypes(WebBrowser.ContentType... contypes)
Content types (see WebBrowser.ContentType) to be disabled.
|
RunConfiguration |
setDisabledThirdPartyContentTypes(Collection<WebBrowser.ContentType> contypes)
Content types (see WebBrowser.ContentType) of third-party web pages to be disabled.
|
RunConfiguration |
setDisabledThirdPartyContentTypes(WebBrowser.ContentType... contypes)
Content types (see WebBrowser.ContentType) of third-party web pages to be disabled.
|
RunConfiguration |
setDisplayNumber(String displayNumber)
Display number for the XVFB mode enabled.
|
RunConfiguration |
setEnablePlugins(boolean enablePlugins)
"Enable plug-ins" flag.
|
RunConfiguration |
setGeoLocation(double latitude,
double longitude)
Specify a Geographical location.
|
RunConfiguration |
setGeoLocation(WebDriverBrowserImpl.GeoLocation location)
Specify a Geographical location.
|
RunConfiguration |
setPageLoadTimeoutSec(int pageLoadTimeoutSec) |
RunConfiguration |
setPositionXMin(int topLeftX)
Leftmost coordinates of the browser window.
|
RunConfiguration |
setPositionYMin(int topLeftY)
Topmost coordinates of the browser window.
|
RunConfiguration |
setScriptTimeoutSec(int scriptTimeoutSec) |
RunConfiguration |
setUseDefaultExecutables(boolean useDefaultExecutable)
Use default browser executables (binaries).
|
RunConfiguration |
setUserAgent(String userAgent)
User-Agent HTTP parameter.
|
RunConfiguration |
setUserExecutable(String binaryPath)
User-provided browser executables (binaries).
|
RunConfiguration |
setXvfbMode(boolean useXvfb)
XVFB Mode.
|
public static final String PATH_SEPARATOR
public static final String COLLECT_STATISTICS_PATH
public static final String USER_AGENT_PATH
public static final String ENABLE_PLUGINS_PATH
public static final String DISABLED_CONTENT_TYPES_PATH
public static final String DISABLED_CONTENT_TYPE_RELPATH
public static final String DISABLED_THIRDPARTY_CONTENT_TYPES_PATH
public static final String DISABLED_THIRDPARTY_CONTENT_TYPE_RELPATH
public static final String USE_XVFB_PATH
public static final String DISPLAY_NUMBER_PATH
public static final String USE_DEFAULT_EXECUTABLES_PATH
public static final String USER_EXECUTABLE_PATH
public static final String LATITUDE_PATH
public static final String LONGITUDE_PATH
public static final String SCRIPT_TIMEOUT_SEC_PATH
public static final String PAGE_LOAD_SEC_PATH
public static final String AUTO_POSITION_PATH
public static final String TOP_LEFT_X_PATH
public static final String TOP_LEFT_Y_PATH
public static final String WIDTH_PATH
public static final String HEIGHT_PATH
public RunConfiguration(ConfigurationObject config)
config
- Configuration object, wrapping the original configuration.public boolean getCollectStatistics()
public RunConfiguration setCollectStatistics(boolean collectStats)
collectStats
- public String getUserAgent()
public RunConfiguration setUserAgent(String userAgent)
userAgent
- public List<WebBrowser.ContentType> getDisabledContentTypes()
public RunConfiguration setDisabledContentTypes(WebBrowser.ContentType... contypes)
contypes
- public RunConfiguration setDisabledContentTypes(Collection<WebBrowser.ContentType> contypes)
contypes
- public RunConfiguration loadOnlyRawHtml()
#setDisabledContentTypes(WebBrowser.ContentType.values()))
.
This will block the loading of any additional resource resulting only in the raw HTML of the page.public List<WebBrowser.ContentType> getDisabledThirdPartyContentTypes()
public RunConfiguration setDisabledThirdPartyContentTypes(WebBrowser.ContentType... contypes)
contypes
- public RunConfiguration setDisabledThirdPartyContentTypes(Collection<WebBrowser.ContentType> contypes)
contypes
- public RunConfiguration doNotLoadAnyThirdPartyContent()
#setDisabledThirdPartyContentTypes(WebBrowser.ContentType.values())
public boolean getEnablePlugins()
public RunConfiguration setEnablePlugins(boolean enablePlugins)
enablePlugins
- public boolean getXvfbMode()
public RunConfiguration setXvfbMode(boolean useXvfb)
useXvfb
- public String getDisplayNumber()
public RunConfiguration setDisplayNumber(String displayNumber)
displayNumber
- public boolean getUseDefaultExecutables()
public RunConfiguration setUseDefaultExecutables(boolean useDefaultExecutable)
useDefaultExecutable
- true
: Forces the usage of the provided browser binary,
false
: user default executables.public String getUserExecutable()
public RunConfiguration setUserExecutable(String binaryPath)
binaryPath
- public WebDriverBrowserImpl.GeoLocation getGeoLocation()
public RunConfiguration setGeoLocation(WebDriverBrowserImpl.GeoLocation location)
location
- public RunConfiguration setGeoLocation(double latitude, double longitude)
latitude
- longitude
- public int getScriptTimeoutSec()
public RunConfiguration setScriptTimeoutSec(int scriptTimeoutSec)
scriptTimeoutSec
- public int getPageLoadTimeoutSec()
public RunConfiguration setPageLoadTimeoutSec(int pageLoadTimeoutSec)
pageLoadTimeoutSec
- public int getBrowserWidth()
public RunConfiguration setBrowserWidth(int width)
width
- public int getBrowserHeight()
public RunConfiguration setBrowserHeight(int height)
height
- public boolean getAutoPosition()
public RunConfiguration setAutoPosition(boolean autoPosition)
autoPosition
- public int getPositionXMin()
public RunConfiguration setPositionXMin(int topLeftX)
topLeftX
- public int getPositionYMin()
public RunConfiguration setPositionYMin(int topLeftY)
topLeftY
- Copyright © 2020 OXPath Team. All rights reserved.