public class Eyes extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.applitools.eyes.EyesScreenshot |
lastScreenshot |
protected 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 ServerConnector |
serverConnector |
protected com.applitools.eyes.SessionStartInfo |
sessionStartInfo |
protected static int |
USE_DEFAULT_TIMEOUT |
protected 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.
|
protected static final int USE_DEFAULT_TIMEOUT
protected ServerConnector serverConnector
protected com.applitools.eyes.RunningSession runningSession
protected com.applitools.eyes.SessionStartInfo sessionStartInfo
protected 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 Logger logger
public Eyes(URI serverUrl)
serverUrl - The Eyes server URL.public Eyes()
public String getBaseAgentId()
public void open(String appName, String testName, 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, 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, Region region, String tag)
public void checkRegion(BufferedImage image, Region region)
public void addMouseTrigger(MouseAction action, Region control, Location cursor)
public RectangleSize getViewportSize()
public void setViewportSize(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(ProxySettings arg0)
public 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(BatchInfo arg0)
public BatchInfo getBatch()
public void setFailureReports(FailureReports arg0)
public FailureReports getFailureReports()
public void setDefaultMatchSettings(ImageMatchSettings arg0)
public ImageMatchSettings getDefaultMatchSettings()
public void setMatchLevel(MatchLevel arg0)
public MatchLevel getMatchLevel()
protected String getFullAgentId()
public boolean getIsOpen()
public static URI getDefaultServerUrl()
public void setLogHandler(LogHandler arg0)
public LogHandler getLogHandler()
public void setScaleRatio(Double arg0)
public double getScaleRatio()
protected void setScaleMethod(ScaleMethod arg0)
protected ScaleMethod getScaleMethod()
public TestResults close()
public 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, RectangleSize arg2, SessionType arg3)
protected void addUserInput(com.applitools.eyes.Trigger arg0)
protected void addMouseTriggerBase(MouseAction arg0, Region arg1, Location arg2)
protected com.applitools.eyes.AppEnvironment getAppEnvironment()
protected void startSession()
Copyright © 2016. All rights reserved.