public class Eyes extends Object implements com.applitools.eyes.IEyesBase
| Constructor and Description |
|---|
Eyes()
Instantiates a new Eyes.
|
Eyes(com.applitools.eyes.EyesRunner runner)
Instantiates a new Eyes.
|
| Modifier and Type | Method and Description |
|---|---|
com.applitools.eyes.TestResults |
abort() |
void |
abortAsync() |
com.applitools.eyes.TestResults |
abortIfNotClosed()
If a test is running, aborts it.
|
void |
addMouseTrigger(com.applitools.eyes.triggers.MouseAction action,
com.applitools.eyes.Region control,
com.applitools.eyes.Location cursor)
Adds a mouse trigger.
|
void |
addMouseTrigger(com.applitools.eyes.triggers.MouseAction action,
org.openqa.selenium.WebElement element)
Adds a mouse trigger.
|
void |
addProperty(String name,
String value)
Adds a property to be sent to the server.
|
void |
addTextTrigger(com.applitools.eyes.Region control,
String text)
Adds a keyboard trigger.
|
void |
addTextTrigger(org.openqa.selenium.WebElement element,
String text)
Adds a keyboard trigger.
|
void |
check(com.applitools.ICheckSettings... checkSettings)
Takes multiple screenshots at once (given all
ICheckSettings objects are on the same level). |
void |
check(com.applitools.ICheckSettings checkSettings)
Check.
|
void |
check(String tag,
com.applitools.ICheckSettings checkSettings)
Check.
|
void |
checkElement(org.openqa.selenium.By selector)
Check element.
|
void |
checkElement(org.openqa.selenium.By selector,
int matchTimeout,
String tag)
Takes a snapshot of the application under test and matches an element
specified by the given selector with the expected region output.
|
void |
checkElement(org.openqa.selenium.By selector,
String tag)
Check element.
|
void |
checkElement(org.openqa.selenium.WebElement element)
|
void |
checkElement(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag)
Takes a snapshot of the application under test and matches a specific
element with the expected region output.
|
void |
checkElement(org.openqa.selenium.WebElement element,
String tag)
Check element.
|
void |
checkFrame(int frameIndex)
Check frame.
|
void |
checkFrame(int frameIndex,
int matchTimeout,
String tag)
Matches the frame given as parameter, by switching into the frame and
using stitching to get an image of the frame.
|
void |
checkFrame(int frameIndex,
String tag)
Check frame.
|
void |
checkFrame(String frameNameOrId)
Check frame.
|
void |
checkFrame(String[] framesPath)
|
void |
checkFrame(String[] framePath,
int matchTimeout,
String tag)
Matches the frame given by the frames path, by switching into the frame
and using stitching to get an image of the frame.
|
void |
checkFrame(String[] framesPath,
String tag)
|
void |
checkFrame(String frameNameOrId,
int matchTimeout,
String tag)
Matches the frame given as parameter, by switching into the frame and
using stitching to get an image of the frame.
|
void |
checkFrame(String frameNameOrId,
String tag)
Check frame.
|
void |
checkFrame(org.openqa.selenium.WebElement frameReference)
Check frame.
|
void |
checkFrame(org.openqa.selenium.WebElement frameReference,
int matchTimeout,
String tag)
Matches the frame given as parameter, by switching into the frame and
using stitching to get an image of the frame.
|
void |
checkFrame(org.openqa.selenium.WebElement frameReference,
String tag)
Check frame.
|
void |
checkRegion(org.openqa.selenium.By selector)
|
void |
checkRegion(org.openqa.selenium.By selector,
boolean stitchContent)
|
void |
checkRegion(org.openqa.selenium.By selector,
int matchTimeout,
String tag)
Takes a snapshot of the application under test and matches a region
specified by the given selector with the expected region output.
|
void |
checkRegion(org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
|
void |
checkRegion(org.openqa.selenium.By selector,
String tag)
|
void |
checkRegion(org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
|
void |
checkRegion(com.applitools.eyes.Region region)
Check region.
|
void |
checkRegion(com.applitools.eyes.Region region,
int matchTimeout,
String tag)
Takes a snapshot of the application under test and matches a specific region within it with the expected output.
|
void |
checkRegion(org.openqa.selenium.WebElement element)
|
void |
checkRegion(org.openqa.selenium.WebElement element,
boolean stitchContent)
If
stitchContent is false then behaves the same as
checkRegion(WebElement), otherwise
behaves the same as checkElement(WebElement). |
void |
checkRegion(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag)
Takes a snapshot of the application under test and matches a region of
a specific element with the expected region output.
|
void |
checkRegion(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag,
boolean stitchContent)
|
void |
checkRegion(org.openqa.selenium.WebElement element,
String tag)
|
void |
checkRegion(org.openqa.selenium.WebElement element,
String tag,
boolean stitchContent)
|
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector)
|
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
boolean stitchContent)
|
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
|
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
Switches into the given frame, takes a snapshot of the application under
test and matches a region specified by the given selector.
|
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
String tag)
|
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
|
void |
checkRegionInFrame(String[] framePath,
org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
Switches into the given frame, takes a snapshot of the application under
test and matches a region specified by the given selector.
|
void |
checkRegionInFrame(String frameNameOrId,
org.openqa.selenium.By selector)
|
void |
checkRegionInFrame(String frameNameOrId,
org.openqa.selenium.By selector,
boolean stitchContent)
|
void |
checkRegionInFrame(String frameNameOrId,
org.openqa.selenium.By selector,
int matchTimeout,
boolean stitchContent)
|
void |
checkRegionInFrame(String frameNameOrId,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
|
void |
checkRegionInFrame(String frameNameOrId,
org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
Switches into the given frame, takes a snapshot of the application under
test and matches a region specified by the given selector.
|
void |
checkRegionInFrame(String frameNameOrId,
org.openqa.selenium.By selector,
String tag)
|
void |
checkRegionInFrame(String frameNameOrId,
org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
|
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector)
|
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
boolean stitchContent)
|
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
|
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
Switches into the given frame, takes a snapshot of the application under
test and matches a region specified by the given selector.
|
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
String tag)
|
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
|
void |
checkWindow()
See
checkWindow(String). |
void |
checkWindow(int matchTimeout,
String tag)
Takes a snapshot of the application under test and matches it with
the expected output.
|
void |
checkWindow(String tag)
|
void |
checkWindow(String tag,
boolean fully) |
void |
clearProperties()
Clears the list of custom properties.
|
com.applitools.eyes.TestResults |
close()
See
close(boolean). |
com.applitools.eyes.TestResults |
close(boolean shouldThrowException)
Close test results.
|
void |
closeAsync() |
List<String> |
extractText(BaseOcrRegion... ocrRegions) |
Map<String,List<TextRegion>> |
extractTextRegions(TextRegionSettings textRegionSettings) |
String |
getAgentId()
Gets agent id.
|
String |
getApiKey()
Gets api key.
|
String |
getAppName()
Gets app name.
|
String |
getBaselineBranchName()
Gets baseline branch name.
|
String |
getBaselineEnvName()
If not
null, determines the name of the environment of the baseline. |
String |
getBaselineName()
Deprecated.
Only available for backward compatibility. See
getBaselineEnvName(). |
com.applitools.eyes.BatchInfo |
getBatch()
Gets batch.
|
String |
getBranchName()
Gets branch name.
|
Configuration |
getConfiguration() |
com.applitools.eyes.positioning.PositionProvider |
getCurrentFramePositionProvider()
Gets current frame position provider.
|
org.openqa.selenium.WebElement |
getCurrentFrameScrollRootElement()
Gets current frame scroll root element.
|
String |
getDebugScreenshotsPath()
Gets debug screenshots path.
|
String |
getDebugScreenshotsPrefix()
Gets debug screenshots prefix.
|
com.applitools.eyes.debug.DebugScreenshotsProvider |
getDebugScreenshotsProvider()
Gets debug screenshots provider.
|
com.applitools.eyes.ImageMatchSettings |
getDefaultMatchSettings()
Gets default match settings.
|
static URI |
getDefaultServerUrl()
Gets default server url.
|
double |
getDevicePixelRatio()
Gets device pixel ratio.
|
org.openqa.selenium.WebDriver |
getDriver()
Gets driver.
|
String |
getEnvName()
If not
null specifies a name for the environment in which the application under test is running. |
com.applitools.eyes.FailureReports |
getFailureReports()
Gets failure reports.
|
boolean |
getForceFullPageScreenshot()
Gets force full page screenshot.
|
String |
getFullAgentId()
Gets full agent id.
|
boolean |
getHideCaret()
Gets hide caret.
|
boolean |
getHideScrollbars()
Gets hide scrollbars.
|
String |
getHostApp()
Gets host app.
|
String |
getHostOS()
Gets host os.
|
boolean |
getIgnoreCaret()
Gets ignore caret.
|
boolean |
getIgnoreDisplacements() |
boolean |
getIsCutProviderExplicitlySet()
Gets is cut provider explicitly set.
|
boolean |
getIsDisabled()
Gets is disabled.
|
boolean |
getIsOpen()
Gets is open.
|
com.applitools.eyes.Logger |
getLogger()
Gets logger.
|
com.applitools.eyes.LogHandler |
getLogHandler()
Gets log handler.
|
com.applitools.eyes.MatchLevel |
getMatchLevel()
Deprecated.
Please use
getDefaultMatchSettings() instead. |
int |
getMatchTimeout()
Gets match timeout.
|
FrameChain |
getOriginalFC()
Gets original fc.
|
String |
getParentBranchName()
Gets parent branch name.
|
com.applitools.eyes.positioning.PositionProvider |
getPositionProvider()
Gets position provider.
|
com.applitools.eyes.AbstractProxySettings |
getProxy()
Gets proxy.
|
com.applitools.eyes.Region |
getRegionToCheck()
Gets region to check.
|
com.applitools.eyes.visualgrid.model.RenderingInfo |
getRenderingInfo()
for internal usage
|
ImageRotation |
getRotation()
Gets rotation.
|
boolean |
getSaveDebugScreenshots()
Gets save debug screenshots.
|
Boolean |
getSaveDiffs()
Returns whether to automatically save differences as a baseline.
|
boolean |
getSaveFailedTests()
Gets save failed tests.
|
boolean |
getSaveNewTests()
Gets save new tests.
|
double |
getScaleRatio()
Gets scale ratio.
|
boolean |
getScrollToRegion()
Gets scroll to region.
|
com.applitools.connectivity.ServerConnector |
getServerConnector()
Gets server connector.
|
URI |
getServerUrl()
Gets server url.
|
StitchMode |
getStitchMode()
Gets stitch mode.
|
int |
getStitchOverlap()
Gets stitch overlap.
|
com.applitools.eyes.RectangleSize |
getViewportSize()
Use this method only if you made a previous call to
(WebDriver, String, String)*** or one of its variants. |
static com.applitools.eyes.RectangleSize |
getViewportSize(org.openqa.selenium.WebDriver driver)
Call this method if for some
reason you don't want to call
open(WebDriver, String, String)
(or one of its variants) yet. |
int |
getWaitBeforeScreenshots()
Gets wait before screenshots.
|
boolean |
isSendDom()
Is send dom boolean.
|
Map<String,List<com.applitools.eyes.Region>> |
locate(VisualLocatorSettings visualLocatorSettings) |
void |
log(String message)
Log.
|
org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver webDriver)
Open web driver.
|
org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver,
String appName,
String testName)
Starts a test.
|
org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize)
Starts a test.
|
void |
setAgentId(String agentId)
Sets the user given agent id of the SDK.
|
void |
setApiKey(String apiKey)
Sets api key.
|
void |
setAppEnvironment(String hostOS,
String hostApp)
Deprecated.
|
void |
setAppName(String appName)
Sets app name.
|
void |
setBaselineBranchName(String branchName)
Sets the branch under which new branches are created.
|
void |
setBaselineEnvName(String baselineEnvName)
If not
null, determines the name of the environment of the baseline. |
void |
setBaselineName(String baselineName)
Deprecated.
Only available for backward compatibility. See
setBaselineEnvName(String). |
void |
setBatch(com.applitools.eyes.BatchInfo batch)
Sets the batch in which context future tests will run or
null
if tests are to run standalone. |
void |
setBranchName(String branchName)
Sets branch name.
|
void |
setConfiguration(com.applitools.eyes.config.Configuration configuration) |
void |
setDebugResourceWriter(com.applitools.eyes.visualgrid.model.IDebugResourceWriter debugResourceWriter) |
void |
setDebugScreenshotsPath(String pathToSave)
Sets debug screenshots path.
|
void |
setDebugScreenshotsPrefix(String prefix)
Sets debug screenshots prefix.
|
void |
setDefaultMatchSettings(com.applitools.eyes.ImageMatchSettings defaultMatchSettings)
Updates the match settings to be used for the session.
|
void |
setEnvName(String envName)
If not
null specifies a name for the environment in which the application under test is running. |
void |
setExplicitViewportSize(com.applitools.eyes.RectangleSize explicitViewportSize)
Sets explicit viewport size.
|
void |
setFailureReports(com.applitools.eyes.FailureReports failureReports)
Sets failure reports.
|
void |
setForceFullPageScreenshot(boolean shouldForce)
Forces a full page screenshot (by scrolling and stitching) if the
browser only supports viewport screenshots).
|
void |
setHideCaret(boolean hideCaret)
Sets hide caret.
|
void |
setHideScrollbars(boolean shouldHide)
Hide the scrollbars when taking screenshots.
|
void |
setHostApp(String hostApp)
Sets host app.
|
void |
setHostOS(String hostOS)
Sets host os.
|
void |
setIgnoreCaret(boolean value)
Sets the ignore blinking caret value.
|
void |
setIgnoreDisplacements(boolean isIgnoreDisplacements) |
void |
setImageCut(com.applitools.eyes.CutProvider cutProvider)
Manually set the the sizes to cut from an image before it's validated.
|
void |
setIsDisabled(Boolean isDisabled)
Sets is disabled.
|
void |
setLogHandler(com.applitools.eyes.LogHandler logHandler)
Sets a handler of log messages generated by this API.
|
void |
setMatchLevel(com.applitools.eyes.MatchLevel matchLevel)
This function is deprecated.
|
void |
setMatchTimeout(int ms)
Sets the maximum time (in ms) a match operation tries to perform a match.
|
void |
setParentBranchName(String branchName)
Sets parent branch name.
|
void |
setPositionProvider(com.applitools.eyes.positioning.PositionProvider positionProvider)
Sets position provider.
|
void |
setProxy(com.applitools.eyes.AbstractProxySettings proxySettings)
Sets the proxy settings to be used by the rest client.
|
void |
setRegionToCheck(com.applitools.eyes.Region regionToCheck)
Sets region to check.
|
void |
setRotation(ImageRotation rotation)
Sets rotation.
|
void |
setSaveDebugScreenshots(boolean saveDebugScreenshots)
Sets save debug screenshots.
|
void |
setSaveDiffs(Boolean saveDiffs)
Automatically save differences as a baseline.
|
void |
setSaveFailedTests(boolean saveFailedTests)
Set whether or not failed tests are saved by default.
|
void |
setSaveNewTests(boolean saveNewTests)
Set whether or not new tests are saved by default.
|
void |
setScaleRatio(Double scaleRatio)
Manually set the scale ratio for the images being validated.
|
void |
setScrollToRegion(boolean shouldScroll)
Turns on/off the automatic scrolling to a region being checked by
checkRegion. |
void |
setSendDom(boolean isSendDom)
Sets send dom.
|
void |
setServerConnector(com.applitools.connectivity.ServerConnector serverConnector)
Sets the server connector to use.
|
void |
setServerUrl(String serverUrl)
Sets server url.
|
void |
setServerUrl(URI serverUri)
Sets server url.
|
void |
setStitchMode(StitchMode mode)
Set the type of stitching used for full page screenshots.
|
void |
setStitchOverlap(int pixels)
Sets the stitching overlap in pixels.
|
static void |
setViewportSize(org.openqa.selenium.WebDriver driver,
com.applitools.eyes.RectangleSize size)
Set the viewport size using the driver.
|
void |
setWaitBeforeScreenshots(int waitBeforeScreenshots)
Sets the time to wait just before taking a screenshot (e.g., to allow
positioning to stabilize when performing a full page stitching).
|
boolean |
shouldStitchContent()
Should stitch content boolean.
|
public Eyes()
public Eyes(com.applitools.eyes.EyesRunner runner)
runner - the runnerpublic org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver webDriver)
webDriver - the web driverpublic org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName)
driver - The web driver that controls the browser hosting the application under test.appName - The name of the application under test.testName - The test name. (i.e., the visible part of the document's body) or null to use the current window's viewport.public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize)
driver - The web driver that controls the browser hosting the application under test.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 use the current window's viewport.sessionType defaults to null.public void setServerUrl(String serverUrl)
serverUrl - the server urlpublic void setServerUrl(URI serverUri)
serverUri - the server URIpublic void setProxy(com.applitools.eyes.AbstractProxySettings proxySettings)
proxySettings - The proxy settings to be used by the rest client.
If null then no proxy is set.public void setIsDisabled(Boolean isDisabled)
setIsDisabled in interface com.applitools.eyes.IEyesBaseisDisabled - If true, all interactions with this API will be silently ignored.public void check(com.applitools.ICheckSettings checkSettings)
checkSettings - the check settingspublic com.applitools.eyes.TestResults close()
public com.applitools.eyes.TestResults abortIfNotClosed()
abortIfNotClosed in interface com.applitools.eyes.IEyesBasepublic com.applitools.eyes.TestResults abort()
abort in interface com.applitools.eyes.IEyesBasepublic void abortAsync()
abortAsync in interface com.applitools.eyes.IEyesBasepublic boolean getIsDisabled()
getIsDisabled in interface com.applitools.eyes.IEyesBasepublic String getApiKey()
getApiKey in interface com.applitools.eyes.IEyesBasepublic void setApiKey(String apiKey)
apiKey - the api keypublic void setBranchName(String branchName)
branchName - the branch namepublic void setParentBranchName(String branchName)
branchName - the branch namepublic void setHideCaret(boolean hideCaret)
hideCaret - the hide caretpublic void setMatchTimeout(int ms)
ms - Total number of ms to wait for a match.public int getMatchTimeout()
public void setSaveNewTests(boolean saveNewTests)
saveNewTests - True if new tests should be saved by default. False otherwise.public boolean getSaveNewTests()
public void setSaveFailedTests(boolean saveFailedTests)
saveFailedTests - True if failed tests should be saved by default, false otherwise.public boolean getSaveFailedTests()
public void setBatch(com.applitools.eyes.BatchInfo batch)
null
if tests are to run standalone.batch - The batch info to set.public com.applitools.eyes.BatchInfo getBatch()
public void setFailureReports(com.applitools.eyes.FailureReports failureReports)
failureReports - The failure reports setting.FailureReportspublic com.applitools.eyes.FailureReports getFailureReports()
public void setDefaultMatchSettings(com.applitools.eyes.ImageMatchSettings defaultMatchSettings)
defaultMatchSettings - The match settings to be used for the session.public com.applitools.eyes.ImageMatchSettings getDefaultMatchSettings()
public void setMatchLevel(com.applitools.eyes.MatchLevel matchLevel)
setDefaultMatchSettings(com.applitools.eyes.ImageMatchSettings) instead.
The test-wide match level to use when checking application screenshot with the expected output.
matchLevel - The match level setting.MatchLevelpublic com.applitools.eyes.MatchLevel getMatchLevel()
getDefaultMatchSettings() instead.public String getFullAgentId()
getFullAgentId in interface com.applitools.eyes.IEyesBasepublic boolean getIsOpen()
getIsOpen in interface com.applitools.eyes.IEyesBasepublic static URI getDefaultServerUrl()
public void setLogHandler(com.applitools.eyes.LogHandler logHandler)
setLogHandler in interface com.applitools.eyes.IEyesBaselogHandler - Handles log messages generated by this API.public com.applitools.eyes.LogHandler getLogHandler()
getLogHandler in interface com.applitools.eyes.IEyesBasepublic com.applitools.eyes.Logger getLogger()
getLogger in interface com.applitools.eyes.IEyesBasepublic void setImageCut(com.applitools.eyes.CutProvider cutProvider)
cutProvider - the provider doing the cut.public boolean getIsCutProviderExplicitlySet()
public void check(String tag, com.applitools.ICheckSettings checkSettings)
tag - the tagcheckSettings - the check settingspublic com.applitools.eyes.TestResults close(boolean shouldThrowException)
shouldThrowException - the should throw exceptionpublic void setScaleRatio(Double scaleRatio)
scaleRatio - The scale ratio to use, or null to reset back to automatic scaling.public double getScaleRatio()
public void addProperty(String name, String value)
addProperty in interface com.applitools.eyes.IEyesBasename - The property name.value - The property value.public void clearProperties()
clearProperties in interface com.applitools.eyes.IEyesBasepublic void setSaveDebugScreenshots(boolean saveDebugScreenshots)
saveDebugScreenshots - If true, will save all screenshots to local directory.public boolean getSaveDebugScreenshots()
public void setDebugScreenshotsPath(String pathToSave)
pathToSave - Path where you want to save the debug screenshots.public String getDebugScreenshotsPath()
public void setDebugScreenshotsPrefix(String prefix)
prefix - The prefix for the screenshots' names.public String getDebugScreenshotsPrefix()
public com.applitools.eyes.debug.DebugScreenshotsProvider getDebugScreenshotsProvider()
public boolean getIgnoreCaret()
public void setIgnoreCaret(boolean value)
value - The ignore value.public int getStitchOverlap()
public void setStitchOverlap(int pixels)
pixels - The width (in pixels) of the overlap.public void checkRegion(com.applitools.eyes.Region region)
region - the region the check. See checkRegion(Region, int, String). tag defaults to null. Default match timeout is used.public void checkRegion(com.applitools.eyes.Region region,
int matchTimeout,
String tag)
throws com.applitools.eyes.exceptions.TestFailedException
region - A non empty region representing the screen region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.com.applitools.eyes.exceptions.TestFailedException - Thrown if a mismatch is detected and immediate failure reports are enabled.public void checkRegion(org.openqa.selenium.WebElement element)
element - The element which represents the region to check.public void checkRegion(org.openqa.selenium.WebElement element,
boolean stitchContent)
stitchContent is false then behaves the same as
checkRegion(WebElement), otherwise
behaves the same as checkElement(WebElement).element - The element which represents the region to check.stitchContent - Whether to take a screenshot of the whole region and stitch if needed.public void checkRegion(org.openqa.selenium.WebElement element,
String tag)
checkRegion(WebElement, int, String).
Default match timeout is used.element - The element which represents the region to check.tag - An optional tag to be associated with the snapshot.public void checkRegion(org.openqa.selenium.WebElement element,
String tag,
boolean stitchContent)
stitchContent is false then behaves the same checkRegion(WebElement, String)***. Otherwise
behaves the same as checkElement(WebElement, String).element - The element which represents the region to check.tag - An optional tag to be associated with the snapshot.stitchContent - Whether to take a screenshot of the whole region and stitch if needed.public void checkRegion(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag)
element - The element which represents the region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.com.applitools.eyes.exceptions.TestFailedException - if a mismatch is detected and immediate failure reports are enabledpublic void checkRegion(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag,
boolean stitchContent)
stitchContent is false then behaves the same checkRegion(WebElement, int, String)***. Otherwise
behaves the same as checkElement(WebElement, String).element - The element which represents the region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.stitchContent - Whether to take a screenshot of the whole region and stitch if needed.public void checkRegion(org.openqa.selenium.By selector)
selector - The selector by which to specify which region to check.public void checkRegion(org.openqa.selenium.By selector,
boolean stitchContent)
stitchContent is false then behaves the same as
checkRegion(By). Otherwise, behaves the
same as #checkElement(org.openqa.selenium.By)selector - The selector by which to specify which region to check.stitchContent - Whether to take a screenshot of the whole region and stitch if needed.public void checkRegion(org.openqa.selenium.By selector,
String tag)
checkRegion(By, int, String).
Default match timeout is used.selector - The selector by which to specify which region to check.tag - An optional tag to be associated with the screenshot.public void checkRegion(org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
stitchContent is false then behaves the same as
checkRegion(By, String). Otherwise,
behaves the same as checkElement(By, String).selector - The selector by which to specify which region to check.tag - An optional tag to be associated with the screenshot.stitchContent - Whether to take a screenshot of the whole region and stitch if needed.public void checkRegion(org.openqa.selenium.By selector,
int matchTimeout,
String tag)
selector - The selector by which to specify which region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the screenshot.com.applitools.eyes.exceptions.TestFailedException - if a mismatch is detected and immediate failure reports are enabledpublic void checkRegion(org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
stitchContent is true then behaves the same as
checkRegion(By, int, String). Otherwise,
behaves the same as checkElement(By, int, String).selector - The selector by which to specify which region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the screenshot.stitchContent - Whether to take a screenshot of the whole region and stitch if needed.public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector)
frameIndex - The index of the frame to switch to. (The same index as would be used in a call to driver.switchTo().frame()).selector - The selector by which to specify which region to check inside the frame.public void checkRegionInFrame(String[] framePath, org.openqa.selenium.By selector, int matchTimeout, String tag, boolean stitchContent)
framePath - The path to the frame to check. This is a list of frame names/IDs (where each frame is nested in the previous frame).selector - A Selector specifying the region to check.matchTimeout - The amount of time to retry matching (milliseconds).tag - An optional tag to be associated with the snapshot.stitchContent - Whether or not to stitch the internal content of the region (i.e., perform checkElement(By, int, String) on the region.public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
frameIndex - The index of the frame to switch to. (The same index as would be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.stitchContent - If true, stitch the internal content of the region (i.e., perform checkElement(By, int, String) on the region.public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
boolean stitchContent)
frameIndex - The index of the frame to switch to. (The same index
as would be used in a call to
driver.switchTo().frame()).selector - The selector by which to specify which region to check inside the frame.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
String tag)
frameIndex - The index of the frame to switch to. (The same index
as would be used in a call to
driver.switchTo().frame()).selector - The selector by which to specify which region to check inside the frame.tag - An optional tag to be associated with the screenshot.public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
checkRegionInFrame(int, By, int, String, boolean).
Default match timeout is used.frameIndex - The index of the frame to switch to. (The same index
as would be used in a call to
driver.switchTo().frame()).selector - The selector by which to specify which region to check inside the frame.tag - An optional tag to be associated with the screenshot.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
frameIndex - The index of the frame to switch to. (The same index
as would be used in a call to
driver.switchTo().frame()).selector - The selector by which to specify which region to check inside the frame.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the screenshot.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector)
frameNameOrId - The name or id of the frame to switch to. (as would
be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, boolean stitchContent)
frameNameOrId - The name or id of the frame to switch to. (as would
be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, int matchTimeout, boolean stitchContent)
frameNameOrId - The name or id of the frame to switch to. (as would
be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, String tag)
frameNameOrId - The name or id of the frame to switch to. (as would
be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check.tag - An optional tag to be associated with the snapshot.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, String tag, boolean stitchContent)
checkRegionInFrame(String, By, int, String, boolean).
Default match timeout is usedframeNameOrId - The name or id of the frame to switch to. (as would
be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check.tag - An optional tag to be associated with the snapshot.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, int matchTimeout, String tag)
frameNameOrId - The name or id of the frame to switch to. (as would be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, int matchTimeout, String tag, boolean stitchContent)
frameNameOrId - The name or id of the frame to switch to. (as would be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.stitchContent - If true, stitch the internal content of the region (i.e., perform checkElement(By, int, String) on the region.public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector)
frameReference - The element which is the frame to switch to. (as would be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
boolean stitchContent)
frameReference - The element which is the frame to switch to. (as would be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.stitchContent - If true, stitch the internal content of the region (i.e., perform checkElement(By, int, String) on the region.public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
String tag)
frameReference - The element which is the frame to switch to. (as would be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.tag - An optional tag to be associated with the snapshot.public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
checkRegionInFrame(WebElement, By, int, String, boolean).
Default match timeout is used.frameReference - The element which is the frame to switch to. (as would be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.tag - An optional tag to be associated with the snapshot.stitchContent - If true, stitch the internal content of the region (i.e., perform checkElement(By, int, String) on the region.public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
frameReference - The element which is the frame to switch to. (as would be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
frameReference - The element which is the frame to switch to. (as would be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.stitchContent - If true, stitch the internal content of the region (i.e., perform checkElement(By, int, String) on the region.public void checkElement(org.openqa.selenium.WebElement element)
element - the elementpublic void checkElement(org.openqa.selenium.WebElement element,
String tag)
element - the element to checktag - See checkElement(WebElement, int, String). Default match timeout is used.public void checkElement(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag)
element - The element to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.com.applitools.eyes.exceptions.TestFailedException - if a mismatch is detected and immediate failure reports are enabledpublic void checkElement(org.openqa.selenium.By selector)
selector - the selector See checkElement(By, String). tag defaults to null.public void checkElement(org.openqa.selenium.By selector,
String tag)
selector - selectortag - tg See checkElement(By, int, String). Default match timeout is used.public void checkElement(org.openqa.selenium.By selector,
int matchTimeout,
String tag)
selector - Selects the element to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the screenshot.com.applitools.eyes.exceptions.TestFailedException - if a mismatch is detected and immediate failure reports are enabledpublic void addMouseTrigger(com.applitools.eyes.triggers.MouseAction action,
com.applitools.eyes.Region control,
com.applitools.eyes.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 addMouseTrigger(com.applitools.eyes.triggers.MouseAction action,
org.openqa.selenium.WebElement element)
action - Mouse action.element - The WebElement on which the click was called.public void addTextTrigger(com.applitools.eyes.Region control,
String text)
control - The control's context-relative region.text - The trigger's text.public void addTextTrigger(org.openqa.selenium.WebElement element,
String text)
element - The element for which we sent keys.text - The trigger's text.public com.applitools.eyes.RectangleSize getViewportSize()
(WebDriver, String, String)*** or one of its variants.
public static com.applitools.eyes.RectangleSize getViewportSize(org.openqa.selenium.WebDriver driver)
open(WebDriver, String, String)
(or one of its variants) yet.driver - The driver to use for getting the viewport.public static void setViewportSize(org.openqa.selenium.WebDriver driver,
com.applitools.eyes.RectangleSize size)
open(WebDriver, String, String)
(or one of its variants) yet.driver - The driver to use for setting the viewport.size - The required viewport size.public boolean getHideCaret()
public boolean shouldStitchContent()
public void setForceFullPageScreenshot(boolean shouldForce)
shouldForce - Whether to force a full page screenshot or not.public boolean getForceFullPageScreenshot()
public void setWaitBeforeScreenshots(int waitBeforeScreenshots)
waitBeforeScreenshots - The time to wait (Milliseconds). Values smaller or equal to 0, will cause the default value to be used.public int getWaitBeforeScreenshots()
public void setScrollToRegion(boolean shouldScroll)
checkRegion.shouldScroll - Whether to automatically scroll to a region being validated.public boolean getScrollToRegion()
public void setStitchMode(StitchMode mode)
StitchMode.CSS.
Default is StitchMode.SCROLL.mode - The stitch mode to set.public StitchMode getStitchMode()
public void setHideScrollbars(boolean shouldHide)
shouldHide - Whether to hide the scrollbars or not.public boolean getHideScrollbars()
public ImageRotation getRotation()
public void setRotation(ImageRotation rotation)
rotation - The image rotation model.public double getDevicePixelRatio()
public void checkWindow()
public void checkWindow(String tag)
checkWindow(int, String).
Default match timeout is used.tag - An optional tag to be associated with the snapshot.public void checkWindow(int matchTimeout,
String tag)
matchTimeout - The amount of time to retry matching (Milliseconds).tag - An optional tag to be associated with the snapshot.com.applitools.eyes.exceptions.TestFailedException - Thrown if a mismatch is detected and immediate failure reports are enabled.public void checkWindow(String tag, boolean fully)
public void check(com.applitools.ICheckSettings... checkSettings)
ICheckSettings objects are on the same level).checkSettings - Multiple ICheckSettings object representing different regions in the viewport.public void checkFrame(String frameNameOrId)
frameNameOrId - frame to check(name or id) See checkFrame(String, int, String).
tag defaults to null. Default match timeout is used.public void checkFrame(String frameNameOrId, String tag)
frameNameOrId - frame to check(name or id)tag - See checkFrame(String, int, String). Default match timeout is used.public void checkFrame(String frameNameOrId, int matchTimeout, String tag)
frameNameOrId - The name or id of the frame to check. (The same name/id as would be used in a call to driver.switchTo().frame()).matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the match.public void checkFrame(int frameIndex)
frameIndex - index of frame See checkFrame(int, int, String). tag defaults to null. Default match timeout is used.public void checkFrame(int frameIndex,
String tag)
frameIndex - index of frametag - See checkFrame(int, int, String). Default match timeout is used.public void checkFrame(int frameIndex,
int matchTimeout,
String tag)
frameIndex - The index of the frame to switch to. (The same index as would be used in a call to driver.switchTo().frame()).matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the match.public void checkFrame(org.openqa.selenium.WebElement frameReference)
frameReference - web element to check See checkFrame(WebElement, int, String). tag defaults to null. Default match timeout is used.public void checkFrame(org.openqa.selenium.WebElement frameReference,
String tag)
frameReference - web element to checktag - tag See checkFrame(WebElement, int, String). Default match timeout is used.public void checkFrame(org.openqa.selenium.WebElement frameReference,
int matchTimeout,
String tag)
frameReference - The element which is the frame to switch to. (as would be used in a call to driver.switchTo().frame() ).matchTimeout - The amount of time to retry matching (milliseconds).tag - An optional tag to be associated with the match.public void checkFrame(String[] framePath, int matchTimeout, String tag)
framePath - The path to the frame to check. This is a list of frame names/IDs (where each frame is nested in the previous frame).matchTimeout - The amount of time to retry matching (milliseconds).tag - An optional tag to be associated with the match.public void checkFrame(String[] framesPath, String tag)
checkFrame(String[], int, String).
Default match timeout is used.framesPath - the frames pathtag - the tagpublic void checkFrame(String[] framesPath)
framesPath - the frames pathpublic URI getServerUrl()
getServerUrl in interface com.applitools.eyes.IEyesBasepublic void setAgentId(String agentId)
null is referred to
as no id.agentId - The agent ID to set.public String getAgentId()
public void setServerConnector(com.applitools.connectivity.ServerConnector serverConnector)
serverConnector - The server connector object to use.public com.applitools.eyes.AbstractProxySettings getProxy()
null if no proxy is set.public void setAppName(String appName)
appName - The name of the application under test.public String getAppName()
public String getHostOS()
public String getHostApp()
public void setBaselineName(String baselineName)
setBaselineEnvName(String).baselineName - If specified, determines the baseline to compare with and disables automatic baseline inference.public String getBaselineName()
getBaselineEnvName().public void setBaselineEnvName(String baselineEnvName)
null, determines the name of the environment of the baseline.baselineEnvName - The name of the baseline's environment.public String getBaselineEnvName()
null, determines the name of the environment of the baseline.null if no such name was set.public void setEnvName(String envName)
null specifies a name for the environment in which the application under test is running.envName - The name of the environment of the baseline.public String getEnvName()
null specifies a name for the environment in which the application under test is running.null if no such name was set.public com.applitools.eyes.positioning.PositionProvider getPositionProvider()
public void setPositionProvider(com.applitools.eyes.positioning.PositionProvider positionProvider)
positionProvider - The position provider to be used.public void setExplicitViewportSize(com.applitools.eyes.RectangleSize explicitViewportSize)
explicitViewportSize - sets the viewportpublic void log(String message)
message - the massage to logpublic boolean isSendDom()
public void setSendDom(boolean isSendDom)
isSendDom - should send dom flagpublic void setHostOS(String hostOS)
hostOS - the hosting hostpublic void setHostApp(String hostApp)
hostApp - The application running the AUT (e.g., Chrome).public com.applitools.eyes.visualgrid.model.RenderingInfo getRenderingInfo()
public String getBranchName()
setBranchName(String)).public String getParentBranchName()
setParentBranchName(String)).public void setBaselineBranchName(String branchName)
setBranchName(String)***.branchName - Branch name or null to specify the default branch.public String getBaselineBranchName()
setBaselineBranchName(String)).public void setSaveDiffs(Boolean saveDiffs)
saveDiffs - Sets whether to automatically save differences as baseline.public Boolean getSaveDiffs()
public void setIgnoreDisplacements(boolean isIgnoreDisplacements)
public boolean getIgnoreDisplacements()
public void setDebugResourceWriter(com.applitools.eyes.visualgrid.model.IDebugResourceWriter debugResourceWriter)
@Deprecated public void setAppEnvironment(String hostOS, String hostApp)
setHostOS(String) and setHostApp(String).
Sets the OS (e.g., Windows) and application (e.g., Chrome) that host the application under test.hostOS - The name of the OS hosting the application under test or null to auto-detect.hostApp - The name of the application hosting the application under test or null to auto-detect.public org.openqa.selenium.WebDriver getDriver()
public FrameChain getOriginalFC()
public com.applitools.eyes.positioning.PositionProvider getCurrentFramePositionProvider()
public com.applitools.eyes.Region getRegionToCheck()
public void setRegionToCheck(com.applitools.eyes.Region regionToCheck)
regionToCheck - the region to checkpublic org.openqa.selenium.WebElement getCurrentFrameScrollRootElement()
public com.applitools.connectivity.ServerConnector getServerConnector()
public Configuration getConfiguration()
public void setConfiguration(com.applitools.eyes.config.Configuration configuration)
public void closeAsync()
closeAsync in interface com.applitools.eyes.IEyesBasepublic Map<String,List<com.applitools.eyes.Region>> locate(VisualLocatorSettings visualLocatorSettings)
public Map<String,List<TextRegion>> extractTextRegions(TextRegionSettings textRegionSettings)
public List<String> extractText(BaseOcrRegion... ocrRegions)
Copyright © 2021. All rights reserved.