public class Eyes extends EyesBase
cutProviderHandler, lastScreenshot, logger, positionProvider, runningSession, scaleProviderHandler, serverConnector, sessionStartInfo, USE_DEFAULT_TIMEOUT, 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 |
addMouseTrigger(MouseAction action,
Region control,
Location cursor) |
void |
addTextTrigger(Region control,
String text) |
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) |
void |
checkRegion(BufferedImage image,
Region region,
String tag) |
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() |
protected String |
getInferredEnvironment() |
EyesScreenshot |
getScreenshot() |
protected String |
getTitle() |
RectangleSize |
getViewportSize() |
void |
open(String appName,
String testName) |
void |
open(String appName,
String testName,
RectangleSize dimensions)
Starts a test.
|
void |
setInferredEnvironment(String inferred) |
void |
setViewportSize(RectangleSize size) |
abortIfNotClosed, addMouseTriggerBase, addTextTriggerBase, addUserInput, checkWindowBase, checkWindowBase, clearUserInputs, close, close, closeResponseTime, getAgentId, getApiKey, getAppEnvironment, getAppName, getBaselineEnvName, getBaselineName, getBatch, getBranchName, getDefaultMatchSettings, getDefaultServerUrl, getEnvName, getFailureReports, getFullAgentId, getHostApp, getHostOS, getIsDisabled, getIsOpen, getLogHandler, getMatchLevel, getMatchTimeout, getParentBranchName, getPositionProvider, getProxy, getSaveFailedTests, getSaveNewTests, getScaleMethod, getScaleRatio, getServerUrl, getUserInputs, openBase, setAgentId, setApiKey, setAppEnvironment, setAppName, setBaselineEnvName, setBaselineName, setBatch, setBranchName, setDefaultMatchSettings, setEnvName, setFailureReports, setHostApp, setHostOS, setImageCut, setIsDisabled, setLogHandler, setMatchLevel, setMatchTimeout, setParentBranchName, setPositionProvider, setProxy, setSaveFailedTests, setSaveNewTests, setScaleMethod, setScaleRatio, setServerUrl, 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.@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()
getViewportSize in class EyesBasepublic void setViewportSize(RectangleSize size)
setViewportSize in class EyesBaseprotected String getInferredEnvironment()
getInferredEnvironment in class EyesBasepublic void setInferredEnvironment(String inferred)
public EyesScreenshot getScreenshot()
getScreenshot in class EyesBaseCopyright © 2016. All rights reserved.