public class PhantomJSDriverService
extends org.openqa.selenium.remote.service.DriverService
| Modifier and Type | Class and Description |
|---|---|
static class |
PhantomJSDriverService.Builder
Builder used to configure new
PhantomJSDriverService instances. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ACCEPT_SSL_CERTS
Capability that allows to access to those sites using self-signed or invalid certificates, and where the certificate
does not match the serving domain as if the HTTPS was configured properly.
|
static java.lang.String |
PHANTOMJS_CLI_ARGS
Capability that allows to add custom command line arguments to the
spawned PhantomJS process.
|
static java.lang.String |
PHANTOMJS_EXECUTABLE_PATH_PROPERTY
System property/capability that defines the location of the PhantomJS executable.
|
static java.lang.String |
PHANTOMJS_GHOSTDRIVER_CLI_ARGS
Capability that allows to pass custom command line arguments to the
GhostDriver JavaScript launch file, spawned PhantomJS process.
|
static java.lang.String |
PHANTOMJS_GHOSTDRIVER_PATH_PROPERTY
Optional System property/capability that defines the location of the
GhostDriver JavaScript launch file (i.e.
|
static java.lang.String |
PHANTOMJS_PAGE_CUSTOMHEADERS_PREFIX
Set capabilities with this prefix to apply it to the PhantomJS
page.customHeaders.* object. |
static java.lang.String |
PHANTOMJS_PAGE_SETTINGS_PREFIX
Set capabilities with this prefix to apply it to the PhantomJS
page.settings.* object. |
| Modifier and Type | Method and Description |
|---|---|
static PhantomJSDriverService |
createDefaultService()
|
static PhantomJSDriverService |
createDefaultService(org.openqa.selenium.Capabilities desiredCapabilities)
Configures and returns a new
PhantomJSDriverService using the default configuration. |
protected static boolean |
findAcceptSslCerts(org.openqa.selenium.Capabilities desiredCapabilities) |
protected static java.io.File |
findGhostDriver(org.openqa.selenium.Capabilities desiredCapabilities,
java.lang.String docsLink,
java.lang.String downloadLink)
Find the GhostDriver main file (i.e.
|
protected static java.io.File |
findPhantomJS(org.openqa.selenium.Capabilities desiredCapabilities,
java.lang.String docsLink,
java.lang.String downloadLink)
Looks into the Capabilities, the current $PATH and the System Properties for
PHANTOMJS_EXECUTABLE_PATH_PROPERTY. |
public static final java.lang.String PHANTOMJS_EXECUTABLE_PATH_PROPERTY
public static final java.lang.String PHANTOMJS_GHOSTDRIVER_PATH_PROPERTY
"src/main.js").public static final java.lang.String PHANTOMJS_CLI_ARGS
Set this capability with a list of of argument strings to add, e.g.
new String[] { "--ignore-ssl-errors=yes", "--load-images=no" }.
public static final java.lang.String PHANTOMJS_GHOSTDRIVER_CLI_ARGS
Set this capability with a list of of argument strings to add, e.g.
new String[] { "--logFile=PATH", "--logLevel=DEBUG" }.
--ip=IP_GHOSTDRIVER_SHOULD_LISTEN_ON--port=PORT_GHOSTDRIVER_SHOULD_LISTEN_ON--hub=HTTP_ADDRESS_TO_SELENIUM_HUB--logFile=PATH_TO_LOGFILE--logLevel=(INFO|DEBUG|WARN|ERROR)--logColor=(false|true)public static final java.lang.String PHANTOMJS_PAGE_SETTINGS_PREFIX
page.settings.* object.
Every PhantomJS WebPage Setting can be used.
See PhantomJS docs.public static final java.lang.String PHANTOMJS_PAGE_CUSTOMHEADERS_PREFIX
page.customHeaders.* object.
Any header can be used.
See PhantomJS docs.public static final java.lang.String ACCEPT_SSL_CERTS
public static PhantomJSDriverService createDefaultService(org.openqa.selenium.Capabilities desiredCapabilities)
PhantomJSDriverService using the default configuration.
PHANTOMJS_EXECUTABLE_PATH_PROPERTYPHANTOMJS_GHOSTDRIVER_PATH_PROPERTY
(Optional - without will use GhostDriver internal to PhantomJS)
desiredCapabilities - desired capabilitiespublic static PhantomJSDriverService createDefaultService()
createDefaultService(org.openqa.selenium.Capabilities).
protected static java.io.File findPhantomJS(org.openqa.selenium.Capabilities desiredCapabilities,
java.lang.String docsLink,
java.lang.String downloadLink)
PHANTOMJS_EXECUTABLE_PATH_PROPERTY.
desiredCapabilities - Capabilities in which we will look for the path to PhantomJSdocsLink - The link to the PhantomJS documentation pagedownloadLink - The link to the PhantomJS download pageFile objectjava.lang.IllegalStateException - If the executable not found or cannot be executedprotected static boolean findAcceptSslCerts(org.openqa.selenium.Capabilities desiredCapabilities)
protected static java.io.File findGhostDriver(org.openqa.selenium.Capabilities desiredCapabilities,
java.lang.String docsLink,
java.lang.String downloadLink)
"main.js").
PHANTOMJS_GHOSTDRIVER_PATH_PROPERTY.
desiredCapabilities - Capabilities in which we will look for the path to GhostDriverdocsLink - The link to the GhostDriver documentation pagedownloadLink - The link to the GhostDriver download pageFile objectjava.lang.IllegalStateException - If the executable not found or cannot be executed