public class Eyes extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.applitools.eyes.AgentConnector |
agentConnector |
static String |
DEFAULT_CHARSET_NAME |
protected static com.applitools.eyes.MatchLevel |
DEFAULT_MATCH_LEVEL |
protected com.applitools.eyes.EyesScreenshot |
lastScreenshot |
protected com.applitools.eyes.RunningSession |
runningSession |
protected com.applitools.eyes.SessionStartInfo |
sessionStartInfo |
protected com.applitools.eyes.RectangleSize |
viewportSize |
| Constructor and Description |
|---|
Eyes()
Creates a new Eyes instance that interacts with the Eyes Server at the
specified url.
|
Eyes(URI serverUrl)
Creates a new Eyes instance that interacts with the Eyes Server at the
specified url.
|
Eyes(URI serverUrl,
boolean isDisabled)
Creates a new (possibly disabled) Eyes instance that interacts
with the Eyes Server at the specified url.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortIfNotClosed() |
void |
addMouseTrigger(com.applitools.eyes.MouseAction action,
com.applitools.eyes.Region control,
com.applitools.eyes.Location cursor)
Adds a mouse trigger.
|
void |
addTextTrigger(com.applitools.eyes.Region control,
String text)
Adds a keyboard trigger.
|
protected void |
addUserInput(com.applitools.eyes.Trigger arg0) |
void |
checkRegion(BufferedImage image,
com.applitools.eyes.Region region)
Perform visual validation of a region for a given image.
|
void |
checkRegion(BufferedImage image,
com.applitools.eyes.Region region,
String tag)
Perform visual validation for a region in a given image.
|
void |
checkRegion(BufferedImage image,
com.applitools.eyes.Region region,
String tag,
boolean ignoreMismatch)
Perform visual validation for the current image.
|
void |
checkWindow(BufferedImage image)
Perform visual validation for a given image.
|
void |
checkWindow(BufferedImage image,
String tag)
Perform visual validation for a given image.
|
void |
checkWindow(BufferedImage image,
String tag,
boolean ignoreMismatch)
Perform visual validation for a given image.
|
protected void |
clearUserInputs() |
com.applitools.eyes.TestResults |
close() |
com.applitools.eyes.TestResults |
close(boolean arg0) |
String |
getAgentId() |
static String |
getApiKey()
Gets the currently set API key or
null if no key is set. |
static URI |
getDefaultServerUrl() |
protected com.applitools.eyes.AppEnvironment |
getEnvironment() |
com.applitools.eyes.FailureReports |
getFailureReports() |
protected String |
getInferredEnvironment() |
boolean |
getIsDisabled() |
boolean |
getIsOpen() |
protected com.applitools.eyes.EyesScreenshot |
getLastScreenshot() |
static com.applitools.eyes.ProxySettings |
getProxy()
Get the current proxy settings.
|
boolean |
getSaveFailedTests() |
boolean |
getSaveNewTests() |
protected String |
getTitle() |
protected com.applitools.eyes.Trigger[] |
getUserInputs() |
protected com.applitools.eyes.RectangleSize |
getViewportSize() |
void |
open(String appName,
String testName)
Starts a test for any viewport size that reports failures upon test
completion.
|
void |
open(String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize)
Starts a test that reports failures upon test completion.
|
void |
open(String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize,
com.applitools.eyes.FailureReports failureReports)
Starts a test.
|
void |
open(String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize,
com.applitools.eyes.MatchLevel matchLevel)
Starts a test that reports failures upon test completion.
|
void |
open(String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize,
com.applitools.eyes.MatchLevel matchLevel,
com.applitools.eyes.FailureReports failureReports)
Starts a test.
|
protected void |
resetLastScreenshot() |
static void |
setApiKey(String apiKey)
Sets the API key of your applitools Eyes account.
|
void |
setAppEnvironment(String arg0,
String arg1) |
void |
setBatch(com.applitools.eyes.BatchInfo arg0) |
void |
setBranchName(String arg0) |
static void |
setLogHandler(com.applitools.eyes.LogHandler logHandler)
Sets a handler of log messages generated by this API.
|
void |
setParentBranchName(String arg0) |
static void |
setProxy(com.applitools.eyes.ProxySettings proxySettings)
Sets a proxy.
|
void |
setSaveFailedTests(boolean arg0) |
void |
setSaveNewTests(boolean arg0) |
protected void |
setViewportSize(com.applitools.eyes.RectangleSize arg0) |
protected void |
startSession() |
protected static final com.applitools.eyes.MatchLevel DEFAULT_MATCH_LEVEL
public static final String DEFAULT_CHARSET_NAME
protected com.applitools.eyes.AgentConnector agentConnector
protected com.applitools.eyes.RunningSession runningSession
protected com.applitools.eyes.SessionStartInfo sessionStartInfo
protected com.applitools.eyes.RectangleSize viewportSize
protected com.applitools.eyes.EyesScreenshot lastScreenshot
public Eyes(URI serverUrl, boolean isDisabled)
serverUrl - The Eyes server URL.isDisabled - If true, all interactions with this API will bepublic Eyes(URI serverUrl)
serverUrl - The Eyes server URL.public Eyes()
public static void setLogHandler(com.applitools.eyes.LogHandler logHandler)
logHandler - Handles log messages generated by this API.public static void setApiKey(String apiKey)
public static String getApiKey()
null if no key is set.public static void setProxy(com.applitools.eyes.ProxySettings proxySettings)
null to remove existing proxy settings.public static com.applitools.eyes.ProxySettings getProxy()
public void open(String appName, String testName, com.applitools.eyes.RectangleSize viewportSize, com.applitools.eyes.MatchLevel matchLevel, com.applitools.eyes.FailureReports failureReports)
appName - The name of the application under test.testName - The test name.viewportSize - The required browser's viewport size
(i.e., the visible part of the document's body) or
null to allow any viewport size.matchLevel - The test-wide match level to use when comparing
actual application outputs with expected outputs
(overrides stricter step-specific match levels).failureReports - Specifies how detected failures are reported.public void open(String appName, String testName, com.applitools.eyes.RectangleSize viewportSize, com.applitools.eyes.MatchLevel matchLevel)
open(java.lang.String, java.lang.String, com.applitools.eyes.RectangleSize, com.applitools.eyes.MatchLevel, com.applitools.eyes.FailureReports).public void open(String appName, String testName, com.applitools.eyes.RectangleSize viewportSize, com.applitools.eyes.FailureReports failureReports)
public void open(String appName, String testName, com.applitools.eyes.RectangleSize viewportSize)
open(java.lang.String, java.lang.String, com.applitools.eyes.RectangleSize, com.applitools.eyes.MatchLevel, com.applitools.eyes.FailureReports).public void open(String appName, String testName)
open(java.lang.String, java.lang.String, com.applitools.eyes.RectangleSize, com.applitools.eyes.MatchLevel, com.applitools.eyes.FailureReports)public void checkRegion(BufferedImage image, com.applitools.eyes.Region region, String tag, boolean ignoreMismatch)
image - The image to perform visual validation for.tag - An optional tag to be associated with the validation
checkpoint.ignoreMismatch - True if the server should ignore a negative
result for the visual validation.TestFailedException - Thrown if a mismatch is detected and
immediate failure reports are enabled.public void checkRegion(BufferedImage image, com.applitools.eyes.Region region, String tag)
image - The image to perform visual validation for.tag - An optional tag to be associated with the validation
checkpoint.TestFailedException - Thrown if a mismatch is detected and
immediate failure reports are enabled.public void checkRegion(BufferedImage image, com.applitools.eyes.Region region)
image - The image to perform visual validation for.TestFailedException - Thrown if a mismatch is detected and
immediate failure reports are enabled.public void checkWindow(BufferedImage image, String tag, boolean ignoreMismatch)
image - The image to perform visual validation for.tag - An optional tag to be associated with the validation
checkpoint.ignoreMismatch - True if the server should ignore a negative
result for the visual validation.TestFailedException - Thrown if a mismatch is detected and
immediate failure reports are enabled.public void checkWindow(BufferedImage image, String tag)
image - The image to perform visual validation for.tag - An optional tag to be associated with the validation
checkpoint.TestFailedException - Thrown if a mismatch is detected and
immediate failure reports are enabled.public void checkWindow(BufferedImage image)
image - The image to perform visual validation for.TestFailedException - Thrown if a mismatch is detected and
immediate failure reports are enabled.public void addMouseTrigger(com.applitools.eyes.MouseAction action,
com.applitools.eyes.Region control,
com.applitools.eyes.Location cursor)
action - Mouse action.control - The control on which the trigger is activated
(location is relative to the window).cursor - The cursor's position relative to the control.public void addTextTrigger(com.applitools.eyes.Region control,
String text)
control - The control's position relative to the window.text - The trigger's text.public String getAgentId()
protected String getInferredEnvironment()
protected String getTitle()
public boolean getIsDisabled()
public boolean getIsOpen()
public com.applitools.eyes.FailureReports getFailureReports()
public boolean getSaveNewTests()
public void setSaveNewTests(boolean arg0)
public boolean getSaveFailedTests()
public void setSaveFailedTests(boolean arg0)
public com.applitools.eyes.TestResults close()
public com.applitools.eyes.TestResults close(boolean arg0)
public void abortIfNotClosed()
public void setBranchName(String arg0)
public void setParentBranchName(String arg0)
public void setBatch(com.applitools.eyes.BatchInfo arg0)
public static URI getDefaultServerUrl()
protected com.applitools.eyes.EyesScreenshot getLastScreenshot()
protected void addUserInput(com.applitools.eyes.Trigger arg0)
protected void resetLastScreenshot()
protected void clearUserInputs()
protected com.applitools.eyes.Trigger[] getUserInputs()
protected com.applitools.eyes.RectangleSize getViewportSize()
protected void setViewportSize(com.applitools.eyes.RectangleSize arg0)
protected com.applitools.eyes.AppEnvironment getEnvironment()
protected void startSession()
Copyright © 2014. All rights reserved.