public class ServerConnector extends RestClient implements IServerConnector
RestClient.HttpMethodCallendPoint, jsonMapper, logger, restClient, serverUrl| Constructor and Description |
|---|
ServerConnector() |
ServerConnector(Logger logger) |
ServerConnector(Logger logger,
URI serverUrl) |
ServerConnector(URI serverUrl) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteSession(TestResults testResults) |
void |
downloadString(URL uri,
boolean isSecondRetry,
IDownloadListener listener) |
String |
getApiKey() |
AbstractProxySettings |
getProxy() |
URI |
getServerUrl() |
MatchResult |
matchWindow(RunningSession runningSession,
MatchWindowData matchData)
Matches the current window (held by the WebDriver) to the expected
window.
|
String |
postDomSnapshot(String domJson) |
void |
setApiKey(String apiKey)
Sets the API key of your applitools Eyes account.
|
void |
setProxy(AbstractProxySettings abstractProxySettings)
Sets the proxy settings to be used by the rest client.
|
void |
setServerUrl(URI serverUrl)
Sets the current server URL used by the rest client.
|
RunningSession |
startSession(SessionStartInfo sessionStartInfo)
Starts a new running session in the agent.
|
TestResults |
stopSession(RunningSession runningSession,
boolean isAborted,
boolean save)
Stops the running session.
|
getLogger, getProxyBase, getReadResponseError, getServerUrlBase, getTimeout, parseResponseWithJsonData, sendLongRequest, setLogger, setProxyBase, setServerUrlBase, setTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLogger, getTimeout, setLoggerpublic ServerConnector(Logger logger, URI serverUrl)
logger - A logger instance.serverUrl - The URI of the Eyes server.public ServerConnector(Logger logger)
logger - A logger instance.public ServerConnector(URI serverUrl)
serverUrl - The URI of the Eyes server.public ServerConnector()
public void setApiKey(String apiKey)
setApiKey in interface IServerConnectorapiKey - The api key to set.public String getApiKey()
getApiKey in interface IServerConnectornull if no key is set.public void setProxy(AbstractProxySettings abstractProxySettings)
setProxy in interface IServerConnectorabstractProxySettings - The proxy settings to be used by the rest client.
If null then no proxy is set.public AbstractProxySettings getProxy()
getProxy in interface IServerConnectornull if no proxy is set.public void setServerUrl(URI serverUrl)
setServerUrl in interface IServerConnectorserverUrl - The URI of the rest server.public URI getServerUrl()
getServerUrl in interface IServerConnectorpublic RunningSession startSession(SessionStartInfo sessionStartInfo) throws EyesException
startSession in interface IServerConnectorsessionStartInfo - The start parameters for the session.EyesException - For invalid status codes, or if response parsing
failed.public TestResults stopSession(RunningSession runningSession, boolean isAborted, boolean save) throws EyesException
stopSession in interface IServerConnectorrunningSession - The running session to be stopped.EyesException - For invalid status codes, or if response parsing
failed.public void deleteSession(TestResults testResults)
deleteSession in interface IServerConnectorpublic MatchResult matchWindow(RunningSession runningSession, MatchWindowData matchData) throws EyesException
matchWindow in interface IServerConnectorrunningSession - The current agent's running session.matchData - Encapsulation of a capture taken from the application.EyesException - For invalid status codes, or response parsing
failed.public void downloadString(URL uri, boolean isSecondRetry, IDownloadListener listener)
downloadString in interface IServerConnectorpublic String postDomSnapshot(String domJson)
postDomSnapshot in interface IServerConnectorCopyright © 2018. All rights reserved.