public class Eyes extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.applitools.eyes.EyesScreenshot |
lastScreenshot |
protected com.applitools.eyes.Logger |
logger |
protected com.applitools.eyes.PositionProvider |
positionProvider |
protected com.applitools.eyes.RunningSession |
runningSession |
protected com.applitools.utils.PropertyHandler<com.applitools.eyes.ScaleProvider> |
scaleProviderHandler |
protected com.applitools.eyes.ServerConnector |
serverConnector |
protected com.applitools.eyes.SessionStartInfo |
sessionStartInfo |
protected static int |
USE_DEFAULT_TIMEOUT |
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 (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) |
protected void |
addMouseTriggerBase(com.applitools.eyes.MouseAction arg0,
com.applitools.eyes.Region arg1,
com.applitools.eyes.Location arg2) |
void |
addTextTrigger(com.applitools.eyes.Region control,
String text) |
protected void |
addTextTriggerBase(com.applitools.eyes.Region arg0,
String arg1) |
protected void |
addUserInput(com.applitools.eyes.Trigger arg0) |
boolean |
checkImage(BufferedImage image) |
boolean |
checkImage(BufferedImage image,
String tag) |
boolean |
checkImage(BufferedImage image,
String tag,
boolean ignoreMismatch)
Matches the input image with the next expected image.
|
boolean |
checkImage(byte[] image) |
boolean |
checkImage(byte[] image,
String tag)
|
boolean |
checkImage(byte[] image,
String tag,
boolean ignoreMismatch)
Matches the input image with the next expected image.
|
boolean |
checkImage(String path) |
boolean |
checkImage(String path,
String tag)
|
boolean |
checkImage(String path,
String tag,
boolean ignoreMismatch)
Matches the image stored in the input file with the next expected image.
|
void |
checkRegion(BufferedImage image,
com.applitools.eyes.Region region) |
void |
checkRegion(BufferedImage image,
com.applitools.eyes.Region region,
String tag) |
boolean |
checkRegion(BufferedImage image,
com.applitools.eyes.Region region,
String tag,
boolean ignoreMismatch)
Perform visual validation for the current image.
|
boolean |
checkWindow(BufferedImage image)
Deprecated.
|
boolean |
checkWindow(BufferedImage image,
String tag)
Deprecated.
|
boolean |
checkWindow(BufferedImage image,
String tag,
boolean ignoreMismatch)
Deprecated.
|
protected com.applitools.eyes.MatchResult |
checkWindowBase(com.applitools.eyes.RegionProvider arg0,
String arg1,
boolean arg2) |
protected com.applitools.eyes.MatchResult |
checkWindowBase(com.applitools.eyes.RegionProvider arg0,
String arg1,
boolean arg2,
int arg3) |
protected void |
clearUserInputs() |
com.applitools.eyes.TestResults |
close() |
com.applitools.eyes.TestResults |
close(boolean arg0) |
protected void |
closeResponseTime(boolean arg0) |
String |
getAgentId() |
String |
getApiKey() |
protected com.applitools.eyes.AppEnvironment |
getAppEnvironment() |
String |
getAppName() |
String |
getBaseAgentId() |
String |
getBaselineName() |
com.applitools.eyes.BatchInfo |
getBatch() |
String |
getBranchName() |
com.applitools.eyes.ImageMatchSettings |
getDefaultMatchSettings() |
static URI |
getDefaultServerUrl() |
com.applitools.eyes.FailureReports |
getFailureReports() |
protected String |
getFullAgentId() |
String |
getHostApp() |
String |
getHostOS() |
protected String |
getInferredEnvironment() |
boolean |
getIsDisabled() |
boolean |
getIsOpen() |
com.applitools.eyes.LogHandler |
getLogHandler() |
com.applitools.eyes.MatchLevel |
getMatchLevel() |
int |
getMatchTimeout() |
String |
getParentBranchName() |
protected com.applitools.eyes.PositionProvider |
getPositionProvider() |
com.applitools.eyes.ProxySettings |
getProxy() |
boolean |
getSaveFailedTests() |
boolean |
getSaveNewTests() |
protected com.applitools.eyes.ScaleMethod |
getScaleMethod() |
double |
getScaleRatio() |
com.applitools.eyes.EyesScreenshot |
getScreenshot() |
URI |
getServerUrl() |
protected String |
getTitle() |
protected com.applitools.eyes.Trigger[] |
getUserInputs() |
com.applitools.eyes.RectangleSize |
getViewportSize() |
void |
open(String appName,
String testName) |
void |
open(String appName,
String testName,
com.applitools.eyes.RectangleSize dimensions)
Starts a test.
|
void |
openBase(String arg0,
String arg1,
com.applitools.eyes.RectangleSize arg2,
com.applitools.eyes.SessionType arg3) |
void |
setAgentId(String arg0) |
void |
setApiKey(String arg0) |
void |
setAppEnvironment(String arg0,
String arg1)
Deprecated.
|
void |
setAppName(String arg0) |
void |
setBaselineName(String arg0) |
void |
setBatch(com.applitools.eyes.BatchInfo arg0) |
void |
setBranchName(String arg0) |
void |
setDefaultMatchSettings(com.applitools.eyes.ImageMatchSettings arg0) |
void |
setFailureReports(com.applitools.eyes.FailureReports arg0) |
void |
setHostApp(String arg0) |
void |
setHostOS(String arg0) |
void |
setInferredEnvironment(String inferred) |
void |
setIsDisabled(boolean arg0) |
void |
setLogHandler(com.applitools.eyes.LogHandler arg0) |
void |
setMatchLevel(com.applitools.eyes.MatchLevel arg0) |
void |
setMatchTimeout(int arg0) |
void |
setParentBranchName(String arg0) |
protected void |
setPositionProvider(com.applitools.eyes.PositionProvider arg0) |
void |
setProxy(com.applitools.eyes.ProxySettings arg0) |
void |
setSaveFailedTests(boolean arg0) |
void |
setSaveNewTests(boolean arg0) |
protected void |
setScaleMethod(com.applitools.eyes.ScaleMethod arg0) |
void |
setScaleRatio(Double arg0) |
void |
setServerUrl(URI arg0) |
void |
setViewportSize(com.applitools.eyes.RectangleSize size) |
protected void |
startSession() |
protected com.applitools.eyes.MatchWindowDataWithScreenshot |
testResponseTimeBase(com.applitools.eyes.RegionProvider arg0,
Runnable arg1,
int arg2,
int arg3,
long arg4) |
protected static final int USE_DEFAULT_TIMEOUT
protected com.applitools.eyes.ServerConnector serverConnector
protected com.applitools.eyes.RunningSession runningSession
protected com.applitools.eyes.SessionStartInfo sessionStartInfo
protected com.applitools.eyes.RectangleSize viewportSize
protected com.applitools.eyes.EyesScreenshot lastScreenshot
protected com.applitools.utils.PropertyHandler<com.applitools.eyes.ScaleProvider> scaleProviderHandler
protected com.applitools.eyes.PositionProvider positionProvider
protected com.applitools.eyes.Logger logger
public Eyes(URI serverUrl)
serverUrl - The Eyes server URL.public Eyes()
public String getBaseAgentId()
public void open(String appName, String testName, com.applitools.eyes.RectangleSize dimensions)
appName - The name of the application under test.testName - The test name.dimensions - Determines the resolution used for the baseline.
null will automatically grab the
resolution from the image.@Deprecated public boolean checkWindow(BufferedImage image)
@Deprecated public boolean checkWindow(BufferedImage image, String tag)
@Deprecated public boolean checkWindow(BufferedImage image, String tag, boolean ignoreMismatch)
public boolean checkImage(BufferedImage image)
public boolean checkImage(BufferedImage image, String tag)
public boolean checkImage(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 boolean checkImage(String path)
public boolean checkImage(String path, String tag)
path - The path to the image to check.tag - The tag to be associated with the visual checkpoint.public boolean checkImage(String path, String tag, boolean ignoreMismatch)
checkImage(BufferedImage, String, boolean).path - The base64 representation of the image's raw bytes.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.public boolean checkImage(byte[] image)
public boolean checkImage(byte[] image,
String tag)
image - The raw png bytes of the image to perform visual validation
for.tag - An optional tag to be associated with the validation
checkpoint.public boolean checkImage(byte[] image,
String tag,
boolean ignoreMismatch)
checkImage(BufferedImage, String, boolean).image - The raw png bytes of 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.public boolean checkRegion(BufferedImage image, com.applitools.eyes.Region region, String tag, boolean ignoreMismatch)
image - The image to perform visual validation for.region - The region to validate within the image.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)
public void checkRegion(BufferedImage image, com.applitools.eyes.Region region)
public void addMouseTrigger(com.applitools.eyes.MouseAction action,
com.applitools.eyes.Region control,
com.applitools.eyes.Location cursor)
public void addTextTrigger(com.applitools.eyes.Region control,
String text)
public com.applitools.eyes.RectangleSize getViewportSize()
public void setViewportSize(com.applitools.eyes.RectangleSize size)
protected String getInferredEnvironment()
public void setInferredEnvironment(String inferred)
public com.applitools.eyes.EyesScreenshot getScreenshot()
protected String getTitle()
public void setAgentId(String arg0)
public String getAgentId()
public void setApiKey(String arg0)
public String getApiKey()
public void setServerUrl(URI arg0)
public URI getServerUrl()
public void setProxy(com.applitools.eyes.ProxySettings arg0)
public com.applitools.eyes.ProxySettings getProxy()
public void setIsDisabled(boolean arg0)
public boolean getIsDisabled()
public void setAppName(String arg0)
public String getAppName()
public void setBranchName(String arg0)
public String getBranchName()
public void setParentBranchName(String arg0)
public String getParentBranchName()
protected void clearUserInputs()
protected com.applitools.eyes.Trigger[] getUserInputs()
public void setMatchTimeout(int arg0)
public int getMatchTimeout()
public void setSaveNewTests(boolean arg0)
public boolean getSaveNewTests()
public void setSaveFailedTests(boolean arg0)
public boolean getSaveFailedTests()
public void setBatch(com.applitools.eyes.BatchInfo arg0)
public com.applitools.eyes.BatchInfo getBatch()
public void setFailureReports(com.applitools.eyes.FailureReports arg0)
public com.applitools.eyes.FailureReports getFailureReports()
public void setDefaultMatchSettings(com.applitools.eyes.ImageMatchSettings arg0)
public com.applitools.eyes.ImageMatchSettings getDefaultMatchSettings()
public void setMatchLevel(com.applitools.eyes.MatchLevel arg0)
public com.applitools.eyes.MatchLevel getMatchLevel()
protected String getFullAgentId()
public boolean getIsOpen()
public static URI getDefaultServerUrl()
public void setLogHandler(com.applitools.eyes.LogHandler arg0)
public com.applitools.eyes.LogHandler getLogHandler()
public void setScaleRatio(Double arg0)
public double getScaleRatio()
protected void setScaleMethod(com.applitools.eyes.ScaleMethod arg0)
protected com.applitools.eyes.ScaleMethod getScaleMethod()
public com.applitools.eyes.TestResults close()
public com.applitools.eyes.TestResults close(boolean arg0)
protected void closeResponseTime(boolean arg0)
public void abortIfNotClosed()
public void setHostOS(String arg0)
public String getHostOS()
public void setHostApp(String arg0)
public String getHostApp()
public void setBaselineName(String arg0)
public String getBaselineName()
@Deprecated public void setAppEnvironment(String arg0, String arg1)
protected com.applitools.eyes.PositionProvider getPositionProvider()
protected void setPositionProvider(com.applitools.eyes.PositionProvider arg0)
protected com.applitools.eyes.MatchResult checkWindowBase(com.applitools.eyes.RegionProvider arg0,
String arg1,
boolean arg2)
protected com.applitools.eyes.MatchResult checkWindowBase(com.applitools.eyes.RegionProvider arg0,
String arg1,
boolean arg2,
int arg3)
protected com.applitools.eyes.MatchWindowDataWithScreenshot testResponseTimeBase(com.applitools.eyes.RegionProvider arg0,
Runnable arg1,
int arg2,
int arg3,
long arg4)
public void openBase(String arg0, String arg1, com.applitools.eyes.RectangleSize arg2, com.applitools.eyes.SessionType arg3)
protected void addUserInput(com.applitools.eyes.Trigger arg0)
protected void addTextTriggerBase(com.applitools.eyes.Region arg0,
String arg1)
protected void addMouseTriggerBase(com.applitools.eyes.MouseAction arg0,
com.applitools.eyes.Region arg1,
com.applitools.eyes.Location arg2)
protected com.applitools.eyes.AppEnvironment getAppEnvironment()
protected void startSession()
Copyright © 2016. All rights reserved.