public class Eyes extends EyesBase
cutProviderHandler, debugScreenshotsProvider, lastScreenshot, logger, positionProvider, runningSession, scaleProviderHandler, serverConnector, sessionStartInfo, stitchingOverlap, USE_DEFAULT_TIMEOUT, viewportSizeHandler| 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 |
addMouseTrigger(MouseAction action,
Region control,
Location cursor)
Adds a mouse trigger.
|
void |
addTextTrigger(Region control,
String text)
Adds a keyboard trigger.
|
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,
Region region)
Perform visual validation of a region for a given image.
|
void |
checkRegion(BufferedImage image,
Region region,
String tag)
Perform visual validation for a region in a given image.
|
boolean |
checkRegion(BufferedImage image,
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.
|
String |
getBaseAgentId()
Get the base agent id.
|
protected String |
getInferredEnvironment()
Get the inferred environment.
|
EyesScreenshot |
getScreenshot()
Get the screenshot.
|
protected String |
getTitle()
Get the title.
|
RectangleSize |
getViewportSize() |
void |
open(String appName,
String testName)
Starts a new test without setting the viewport size of the AUT.
|
void |
open(String appName,
String testName,
RectangleSize dimensions)
Starts a test.
|
void |
setInferredEnvironment(String inferred)
Sets the inferred environment for the test.
|
void |
setViewportSize(RectangleSize size)
Set the viewport size.
|
abortIfNotClosed, addMouseTriggerBase, addProperty, addTextTriggerBase, addUserInput, checkWindowBase, checkWindowBase, checkWindowBase, clearUserInputs, close, close, closeResponseTime, getAgentId, getApiKey, getAppEnvironment, getAppName, getBaselineEnvName, getBaselineName, getBatch, getBranchName, getDebugScreenshotsPath, getDebugScreenshotsPrefix, getDebugScreenshotsProvider, getDefaultMatchSettings, getDefaultServerUrl, getEnvName, getFailureReports, getFullAgentId, getHostApp, getHostOS, getIgnoreCaret, getIsDisabled, getIsOpen, getLogHandler, getMatchLevel, getMatchTimeout, getParentBranchName, getPositionProvider, getProxy, getSaveDebugScreenshots, getSaveFailedTests, getSaveNewTests, getScaleRatio, getServerUrl, getStitchOverlap, getUserInputs, openBase, setAgentId, setApiKey, setAppEnvironment, setAppName, setBaselineEnvName, setBaselineName, setBatch, setBranchName, setDebugScreenshotsPath, setDebugScreenshotsPrefix, setDefaultMatchSettings, setEnvName, setExplicitViewportSize, setFailureReports, setHostApp, setHostOS, setIgnoreCaret, setImageCut, setIsDisabled, setLogHandler, setMatchLevel, setMatchTimeout, setParentBranchName, setPositionProvider, setProxy, setSaveDebugScreenshots, setSaveFailedTests, setSaveNewTests, setScaleRatio, setServerUrl, setStitchOverlap, startSession, testResponseTimeBasepublic Eyes(URI serverUrl)
serverUrl - The Eyes server URL.public Eyes()
public String getBaseAgentId()
getBaseAgentId in class EyesBasepublic 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.public void open(String appName, String testName)
appName - The name of the application under test.testName - The test name.open(String, String, RectangleSize)@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)
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)
image - The raw png bytes of the image to perform visual validation for.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.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)
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.TestFailedException - Thrown if a mismatch is detected and immediate failure reports are enabled.public void checkRegion(BufferedImage image, Region region)
image - The image to perform visual validation for.region - The region to validate within the image.TestFailedException - Thrown if a mismatch is detected and immediate failure reports are enabled.public void addMouseTrigger(MouseAction action, Region control, Location cursor)
action - Mouse action.control - The control on which the trigger is activated (context
relative coordinates).cursor - The cursor's position relative to the control.public void addTextTrigger(Region control, String text)
control - The control's context-relative region.text - The trigger's text.public RectangleSize getViewportSize()
getViewportSize in class EyesBasepublic void setViewportSize(RectangleSize size)
setViewportSize in class EyesBasesize - The required viewport size.protected String getInferredEnvironment()
getInferredEnvironment in class EyesBasepublic void setInferredEnvironment(String inferred)
inferred - The inferred environment string.public EyesScreenshot getScreenshot()
getScreenshot in class EyesBaseCopyright © 2017. All rights reserved.