Package com.applitools.eyes.selenium
Class Eyes
- java.lang.Object
-
- com.applitools.eyes.selenium.Eyes
-
- All Implemented Interfaces:
com.applitools.eyes.IEyesBase
public class Eyes extends Object implements com.applitools.eyes.IEyesBase
The type Eyes.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description com.applitools.eyes.TestResults
abort()
void
abortAsync()
com.applitools.eyes.TestResults
abortIfNotClosed()
If a test is running, aborts it.void
addProperty(String name, String value)
Adds a property to be sent to the server.void
check(com.applitools.ICheckSettings[] checkSettings)
Check an array of targets.void
check(com.applitools.ICheckSettings checkSettings, com.applitools.ICheckSettings... additionalSettings)
Check one or more targets.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(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.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(org.openqa.selenium.WebElement element)
void
checkRegion(org.openqa.selenium.WebElement element, boolean stitchContent)
IfstitchContent
isfalse
then behaves the same ascheckRegion(WebElement)
, otherwise behaves the same ascheckElement(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()
SeecheckWindow(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()
Seeclose(boolean)
.com.applitools.eyes.TestResults
close(boolean shouldThrowException)
Close test results.void
closeAsync()
com.applitools.eyes.config.Configuration
configure()
List<String>
extractText(com.applitools.eyes.locators.BaseOcrRegion... ocrRegions)
Map<String,List<com.applitools.eyes.locators.TextRegion>>
extractTextRegions(com.applitools.eyes.locators.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 notnull
, determines the name of the environment of the baseline.String
getBaselineName()
Deprecated.Only available for backward compatibility.com.applitools.eyes.BatchInfo
getBatch()
Gets batch.String
getBranchName()
Gets branch name.com.applitools.eyes.selenium.Configuration
getConfiguration()
com.applitools.eyes.positioning.PositionProvider
getCurrentFramePositionProvider()
Deprecated.org.openqa.selenium.WebElement
getCurrentFrameScrollRootElement()
Deprecated.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 notnull
specifies a name for the environment in which the application under test is running.static String
getExecutionCloudURL()
Get the Execution Cloud URL.com.applitools.eyes.universal.Reference
getEyesRef()
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 usegetDefaultMatchSettings()
instead.int
getMatchTimeout()
Gets match timeout.String
getParentBranchName()
Gets parent branch name.com.applitools.eyes.positioning.PositionProvider
getPositionProvider()
Deprecated.com.applitools.eyes.AbstractProxySettings
getProxy()
Gets proxy.com.applitools.eyes.Region
getRegionToCheck()
Deprecated.List<com.applitools.eyes.TestResults>
getResults()
List<com.applitools.eyes.TestResults>
getResults(boolean shouldThrowException)
com.applitools.eyes.selenium.positioning.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.URI
getServerUrl()
Gets server url.com.applitools.eyes.selenium.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 callopen(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(com.applitools.eyes.locators.VisualLocatorSettings visualLocatorSettings)
void
log(String message)
Log.void
open(String appName, String testName)
Starts a test without a drivervoid
open(String appName, String testName, com.applitools.eyes.RectangleSize viewportSize)
Starts a test without a driverorg.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 notnull
, determines the name of the environment of the baseline.void
setBaselineName(String baselineName)
Deprecated.Only available for backward compatibility.void
setBatch(com.applitools.eyes.BatchInfo batch)
Sets the batch in which context future tests will run ornull
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)
Deprecated.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 notnull
specifies a name for the environment in which the application under test is running.void
setExplicitViewportSize(com.applitools.eyes.RectangleSize explicitViewportSize)
Deprecated.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)
Deprecated.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)
Deprecated.void
setRotation(com.applitools.eyes.selenium.positioning.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 bycheckRegion
.void
setSendDom(boolean isSendDom)
Sets send dom.void
setServerUrl(String serverUrl)
Sets server url.void
setServerUrl(URI serverUri)
Sets server url.void
setStitchMode(com.applitools.eyes.selenium.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.
-
-
-
Method Detail
-
getExecutionCloudURL
public static String getExecutionCloudURL()
Get the Execution Cloud URL.- Returns:
- the Execution Cloud URL using default params
-
open
public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver webDriver)
Open web driver.- Parameters:
webDriver
- the web driver- Returns:
- the web driver
-
open
public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver, String appName, String testName)
Starts a test.- Parameters:
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) ornull
to use the current window's viewport.- Returns:
- A wrapped WebDriver which enables SeleniumEyes trigger recording and frame handling.
-
open
public void open(String appName, String testName)
Starts a test without a driver- Parameters:
appName
- The name of the application under test.testName
- The test name. (i.e., the visible part of the document's body) ornull
to use the current window's viewport.
-
open
public void open(String appName, String testName, com.applitools.eyes.RectangleSize viewportSize)
Starts a test without a driver- Parameters:
appName
- The name of the application under test.testName
- The test name. (i.e., the visible part of the document's body) ornull
to use the current window's viewport.viewportSize
- The required browser's viewport size (i.e., the visible part of the document's body) ornull
to use the current window's viewport.
-
open
public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver, String appName, String testName, com.applitools.eyes.RectangleSize viewportSize)
Starts a test.- Parameters:
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) ornull
to use the current window's viewport.- Returns:
- A wrapped WebDriver which enables SeleniumEyes trigger recording and frame handling.
sessionType
defaults tonull
.
-
setServerUrl
public void setServerUrl(String serverUrl)
Sets server url.- Parameters:
serverUrl
- the server url
-
setServerUrl
public void setServerUrl(URI serverUri)
Sets server url.- Parameters:
serverUri
- the server URI
-
setProxy
public void setProxy(com.applitools.eyes.AbstractProxySettings proxySettings)
Sets the proxy settings to be used by the rest client.- Parameters:
proxySettings
- The proxy settings to be used by the rest client. Ifnull
then no proxy is set.
-
setIsDisabled
public void setIsDisabled(Boolean isDisabled)
Sets is disabled.- Specified by:
setIsDisabled
in interfacecom.applitools.eyes.IEyesBase
- Parameters:
isDisabled
- If true, all interactions with this API will be silently ignored.
-
check
public void check(com.applitools.ICheckSettings[] checkSettings)
Check an array of targets.- Parameters:
checkSettings
- the check settings array (@see Target, @see ICheckSettings)
-
check
public void check(com.applitools.ICheckSettings checkSettings, com.applitools.ICheckSettings... additionalSettings)
Check one or more targets.- Parameters:
checkSettings
- the check settings (@see Target, @see ICheckSettings)additionalSettings
- optional additional targets to check.
-
close
public com.applitools.eyes.TestResults close()
- Returns:
- The test results.
-
abortIfNotClosed
public com.applitools.eyes.TestResults abortIfNotClosed()
If a test is running, aborts it. Otherwise, does nothing.- Specified by:
abortIfNotClosed
in interfacecom.applitools.eyes.IEyesBase
-
abort
public com.applitools.eyes.TestResults abort()
- Specified by:
abort
in interfacecom.applitools.eyes.IEyesBase
-
getResults
public List<com.applitools.eyes.TestResults> getResults(boolean shouldThrowException)
- Specified by:
getResults
in interfacecom.applitools.eyes.IEyesBase
-
getResults
public List<com.applitools.eyes.TestResults> getResults()
- Specified by:
getResults
in interfacecom.applitools.eyes.IEyesBase
-
abortAsync
public void abortAsync()
- Specified by:
abortAsync
in interfacecom.applitools.eyes.IEyesBase
-
getIsDisabled
public Boolean getIsDisabled()
Gets is disabled.- Specified by:
getIsDisabled
in interfacecom.applitools.eyes.IEyesBase
- Returns:
- Whether eyes is disabled.
-
getApiKey
public String getApiKey()
Gets api key.- Specified by:
getApiKey
in interfacecom.applitools.eyes.IEyesBase
- Returns:
- the api key
-
setApiKey
public void setApiKey(String apiKey)
Sets api key.- Parameters:
apiKey
- the api key
-
setBranchName
public void setBranchName(String branchName)
Sets branch name.- Parameters:
branchName
- the branch name
-
setParentBranchName
public void setParentBranchName(String branchName)
Sets parent branch name.- Parameters:
branchName
- the branch name
-
setHideCaret
public void setHideCaret(boolean hideCaret)
Sets hide caret.- Parameters:
hideCaret
- the hide caret
-
setMatchTimeout
public void setMatchTimeout(int ms)
Sets the maximum time (in ms) a match operation tries to perform a match.- Parameters:
ms
- Total number of ms to wait for a match.
-
getMatchTimeout
public int getMatchTimeout()
Gets match timeout.- Returns:
- The maximum time in ms waits for a match.
-
setSaveNewTests
public void setSaveNewTests(boolean saveNewTests)
Set whether or not new tests are saved by default.- Parameters:
saveNewTests
- True if new tests should be saved by default. False otherwise.
-
getSaveNewTests
public boolean getSaveNewTests()
Gets save new tests.- Returns:
- True if new tests are saved by default.
-
setSaveFailedTests
public void setSaveFailedTests(boolean saveFailedTests)
Set whether or not failed tests are saved by default.- Parameters:
saveFailedTests
- True if failed tests should be saved by default, false otherwise.
-
getSaveFailedTests
public boolean getSaveFailedTests()
Gets save failed tests.- Returns:
- True if failed tests are saved by default.
-
setBatch
public void setBatch(com.applitools.eyes.BatchInfo batch)
Sets the batch in which context future tests will run ornull
if tests are to run standalone.- Parameters:
batch
- The batch info to set.
-
getBatch
public com.applitools.eyes.BatchInfo getBatch()
Gets batch.- Returns:
- The currently set batch info.
-
setFailureReports
public void setFailureReports(com.applitools.eyes.FailureReports failureReports)
Sets failure reports.- Parameters:
failureReports
- The failure reports setting.- See Also:
FailureReports
-
getFailureReports
public com.applitools.eyes.FailureReports getFailureReports()
Gets failure reports.- Returns:
- the failure reports setting.
-
setDefaultMatchSettings
public void setDefaultMatchSettings(com.applitools.eyes.ImageMatchSettings defaultMatchSettings)
Updates the match settings to be used for the session.- Parameters:
defaultMatchSettings
- The match settings to be used for the session.
-
getDefaultMatchSettings
public com.applitools.eyes.ImageMatchSettings getDefaultMatchSettings()
Gets default match settings.- Returns:
- The match settings used for the session.
-
setMatchLevel
public void setMatchLevel(com.applitools.eyes.MatchLevel matchLevel)
This function is deprecated. Please usesetDefaultMatchSettings(com.applitools.eyes.ImageMatchSettings)
instead.The test-wide match level to use when checking application screenshot with the expected output.
- Parameters:
matchLevel
- The match level setting.- See Also:
MatchLevel
-
getMatchLevel
public com.applitools.eyes.MatchLevel getMatchLevel()
Deprecated.Please usegetDefaultMatchSettings()
instead.Gets match level.- Returns:
- The test-wide match level.
-
getFullAgentId
public String getFullAgentId()
Gets full agent id.- Specified by:
getFullAgentId
in interfacecom.applitools.eyes.IEyesBase
- Returns:
- The full agent id composed of both the base agent id and the user given agent id.
-
getIsOpen
public boolean getIsOpen()
Gets is open.- Specified by:
getIsOpen
in interfacecom.applitools.eyes.IEyesBase
- Returns:
- Whether a session is open.
-
getDefaultServerUrl
public static URI getDefaultServerUrl()
Gets default server url.- Returns:
- the default server url
-
setLogHandler
public void setLogHandler(com.applitools.eyes.LogHandler logHandler)
Sets a handler of log messages generated by this API.- Specified by:
setLogHandler
in interfacecom.applitools.eyes.IEyesBase
- Parameters:
logHandler
- Handles log messages generated by this API.
-
getLogHandler
public com.applitools.eyes.LogHandler getLogHandler()
Gets log handler.- Specified by:
getLogHandler
in interfacecom.applitools.eyes.IEyesBase
- Returns:
- The currently set log handler.
-
getLogger
public com.applitools.eyes.Logger getLogger()
Gets logger.- Specified by:
getLogger
in interfacecom.applitools.eyes.IEyesBase
- Returns:
- the logger
-
setImageCut
public void setImageCut(com.applitools.eyes.CutProvider cutProvider)
Manually set the the sizes to cut from an image before it's validated.- Parameters:
cutProvider
- the provider doing the cut.
-
getIsCutProviderExplicitlySet
public boolean getIsCutProviderExplicitlySet()
Gets is cut provider explicitly set.- Returns:
- the is cut provider explicitly set
-
check
public void check(String tag, com.applitools.ICheckSettings checkSettings)
Check.- Parameters:
tag
- the tagcheckSettings
- the check settings
-
close
public com.applitools.eyes.TestResults close(boolean shouldThrowException)
Close test results.- Parameters:
shouldThrowException
- the should throw exception- Returns:
- the test results
-
setScaleRatio
public void setScaleRatio(Double scaleRatio)
Manually set the scale ratio for the images being validated.- Parameters:
scaleRatio
- The scale ratio to use, ornull
to reset back to automatic scaling.
-
getScaleRatio
public Double getScaleRatio()
Gets scale ratio.- Returns:
- The ratio used to scale the images being validated.
-
addProperty
public void addProperty(String name, String value)
Adds a property to be sent to the server.- Specified by:
addProperty
in interfacecom.applitools.eyes.IEyesBase
- Parameters:
name
- The property name.value
- The property value.
-
clearProperties
public void clearProperties()
Clears the list of custom properties.- Specified by:
clearProperties
in interfacecom.applitools.eyes.IEyesBase
-
setSaveDebugScreenshots
public void setSaveDebugScreenshots(Boolean saveDebugScreenshots)
Sets save debug screenshots.- Parameters:
saveDebugScreenshots
- If true, will save all screenshots to local directory.
-
getSaveDebugScreenshots
public Boolean getSaveDebugScreenshots()
Gets save debug screenshots.- Returns:
- True if screenshots saving enabled.
-
setDebugScreenshotsPath
public void setDebugScreenshotsPath(String pathToSave)
Sets debug screenshots path.- Parameters:
pathToSave
- Path where you want to save the debug screenshots.
-
getDebugScreenshotsPath
public String getDebugScreenshotsPath()
Gets debug screenshots path.- Returns:
- The path where you want to save the debug screenshots.
-
setDebugScreenshotsPrefix
public void setDebugScreenshotsPrefix(String prefix)
Sets debug screenshots prefix.- Parameters:
prefix
- The prefix for the screenshots' names.
-
getDebugScreenshotsPrefix
public String getDebugScreenshotsPrefix()
Gets debug screenshots prefix.- Returns:
- The prefix for the screenshots' names.
-
getDebugScreenshotsProvider
public com.applitools.eyes.debug.DebugScreenshotsProvider getDebugScreenshotsProvider()
Gets debug screenshots provider.- Returns:
- the debug screenshots provider
-
getIgnoreCaret
public boolean getIgnoreCaret()
Gets ignore caret.- Returns:
- Whether to ignore or the blinking caret or not when comparing images.
-
setIgnoreCaret
public void setIgnoreCaret(boolean value)
Sets the ignore blinking caret value.- Parameters:
value
- The ignore value.
-
getStitchOverlap
public int getStitchOverlap()
Gets stitch overlap.- Returns:
- Returns the stitching overlap in pixels.
-
setStitchOverlap
public void setStitchOverlap(int pixels)
Sets the stitching overlap in pixels.- Parameters:
pixels
- The width (in pixels) of the overlap.
-
checkRegion
public void checkRegion(com.applitools.eyes.Region region)
Check region.- Parameters:
region
- the region the check. SeecheckRegion(Region, int, String)
.tag
defaults tonull
. Default match timeout is used.
-
checkRegion
public void checkRegion(com.applitools.eyes.Region region, int matchTimeout, String tag) throws com.applitools.eyes.exceptions.TestFailedException
Takes a snapshot of the application under test and matches a specific region within it with the expected output.- Parameters:
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.- Throws:
com.applitools.eyes.exceptions.TestFailedException
- Thrown if a mismatch is detected and immediate failure reports are enabled.
-
checkRegion
public void checkRegion(org.openqa.selenium.WebElement element)
- Parameters:
element
- The element which represents the region to check.
-
checkRegion
public void checkRegion(org.openqa.selenium.WebElement element, boolean stitchContent)
IfstitchContent
isfalse
then behaves the same ascheckRegion(WebElement)
, otherwise behaves the same ascheckElement(WebElement)
.- Parameters:
element
- The element which represents the region to check.stitchContent
- Whether to take a screenshot of the whole region and stitch if needed.
-
checkRegion
public void checkRegion(org.openqa.selenium.WebElement element, String tag)
SeecheckRegion(WebElement, int, String)
. Default match timeout is used.- Parameters:
element
- The element which represents the region to check.tag
- An optional tag to be associated with the snapshot.
-
checkRegion
public void checkRegion(org.openqa.selenium.WebElement element, String tag, boolean stitchContent)
ifstitchContent
isfalse
then behaves the samecheckRegion(WebElement, String)
***. Otherwise behaves the same ascheckElement(WebElement, String)
.- Parameters:
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.
-
checkRegion
public 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.- Parameters:
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.- Throws:
com.applitools.eyes.exceptions.TestFailedException
- if a mismatch is detected and immediate failure reports are enabled
-
checkRegion
public void checkRegion(org.openqa.selenium.WebElement element, int matchTimeout, String tag, boolean stitchContent)
ifstitchContent
isfalse
then behaves the samecheckRegion(WebElement, int, String)
***. Otherwise behaves the same ascheckElement(WebElement, String)
.- Parameters:
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.
-
checkRegion
public void checkRegion(org.openqa.selenium.By selector)
- Parameters:
selector
- The selector by which to specify which region to check.
-
checkRegion
public void checkRegion(org.openqa.selenium.By selector, boolean stitchContent)
IfstitchContent
isfalse
then behaves the same ascheckRegion(By)
. Otherwise, behaves the same as#checkElement(org.openqa.selenium.By)
- Parameters:
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.
-
checkRegion
public void checkRegion(org.openqa.selenium.By selector, String tag)
SeecheckRegion(By, int, String)
. Default match timeout is used.- Parameters:
selector
- The selector by which to specify which region to check.tag
- An optional tag to be associated with the screenshot.
-
checkRegion
public void checkRegion(org.openqa.selenium.By selector, String tag, boolean stitchContent)
IfstitchContent
isfalse
then behaves the same ascheckRegion(By, String)
. Otherwise, behaves the same ascheckElement(By, String)
.- Parameters:
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.
-
checkRegion
public 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.- Parameters:
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.- Throws:
com.applitools.eyes.exceptions.TestFailedException
- if a mismatch is detected and immediate failure reports are enabled
-
checkRegion
public void checkRegion(org.openqa.selenium.By selector, int matchTimeout, String tag, boolean stitchContent)
IfstitchContent
istrue
then behaves the same ascheckRegion(By, int, String)
. Otherwise, behaves the same ascheckElement(By, int, String)
.- Parameters:
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.
-
checkRegionInFrame
public void checkRegionInFrame(int frameIndex, org.openqa.selenium.By selector)
- Parameters:
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.
-
checkRegionInFrame
public 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.- Parameters:
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., performcheckElement(By, int, String)
on the region.
-
checkRegionInFrame
public 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.- Parameters:
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
- Iftrue
, stitch the internal content of the region (i.e., performcheckElement(By, int, String)
on the region.
-
checkRegionInFrame
public void checkRegionInFrame(int frameIndex, org.openqa.selenium.By selector, boolean stitchContent)
- Parameters:
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
- Iftrue
, stitch the internal content of the region (i.e., performcheckElement(By, int, String)
on the region.
-
checkRegionInFrame
public void checkRegionInFrame(int frameIndex, org.openqa.selenium.By selector, String tag)
- Parameters:
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.
-
checkRegionInFrame
public void checkRegionInFrame(int frameIndex, org.openqa.selenium.By selector, String tag, boolean stitchContent)
SeecheckRegionInFrame(int, By, int, String, boolean)
. Default match timeout is used.- Parameters:
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
- Iftrue
, stitch the internal content of the region (i.e., performcheckElement(By, int, String)
on the region.
-
checkRegionInFrame
public void checkRegionInFrame(int frameIndex, org.openqa.selenium.By selector, int matchTimeout, String tag)
- Parameters:
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.
-
checkRegionInFrame
public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector)
- Parameters:
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.
-
checkRegionInFrame
public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, boolean stitchContent)
- Parameters:
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
- Iftrue
, stitch the internal content of the region (i.e., performcheckElement(By, int, String)
on the region.
-
checkRegionInFrame
public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, int matchTimeout, boolean stitchContent)
- Parameters:
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
- Iftrue
, stitch the internal content of the region (i.e., performcheckElement(By, int, String)
on the region.
-
checkRegionInFrame
public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, String tag)
- Parameters:
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.
-
checkRegionInFrame
public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, String tag, boolean stitchContent)
SeecheckRegionInFrame(String, By, int, String, boolean)
. Default match timeout is used- Parameters:
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.stitchContent
- Iftrue
, stitch the internal content of the region (i.e., performcheckElement(By, int, String)
on the region.
-
checkRegionInFrame
public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, int matchTimeout, String tag)
- Parameters:
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.
-
checkRegionInFrame
public 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.- Parameters:
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
- Iftrue
, stitch the internal content of the region (i.e., performcheckElement(By, int, String)
on the region.
-
checkRegionInFrame
public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference, org.openqa.selenium.By selector)
- Parameters:
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.
-
checkRegionInFrame
public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference, org.openqa.selenium.By selector, boolean stitchContent)
- Parameters:
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
- Iftrue
, stitch the internal content of the region (i.e., performcheckElement(By, int, String)
on the region.
-
checkRegionInFrame
public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference, org.openqa.selenium.By selector, String tag)
- Parameters:
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.
-
checkRegionInFrame
public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference, org.openqa.selenium.By selector, String tag, boolean stitchContent)
SeecheckRegionInFrame(WebElement, By, int, String, boolean)
. Default match timeout is used.- Parameters:
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
- Iftrue
, stitch the internal content of the region (i.e., performcheckElement(By, int, String)
on the region.
-
checkRegionInFrame
public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference, org.openqa.selenium.By selector, int matchTimeout, String tag)
- Parameters:
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.
-
checkRegionInFrame
public 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.- Parameters:
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
- Iftrue
, stitch the internal content of the region (i.e., performcheckElement(By, int, String)
on the region.
-
checkElement
public void checkElement(org.openqa.selenium.WebElement element)
- Parameters:
element
- the element
-
checkElement
public void checkElement(org.openqa.selenium.WebElement element, String tag)
Check element.- Parameters:
element
- the element to checktag
- SeecheckElement(WebElement, int, String)
. Default match timeout is used.
-
checkElement
public 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.- Parameters:
element
- The element to check.matchTimeout
- The amount of time to retry matching. (Milliseconds)tag
- An optional tag to be associated with the snapshot.- Throws:
com.applitools.eyes.exceptions.TestFailedException
- if a mismatch is detected and immediate failure reports are enabled
-
checkElement
public void checkElement(org.openqa.selenium.By selector)
Check element.- Parameters:
selector
- the selector SeecheckElement(By, String)
.tag
defaults tonull
.
-
checkElement
public void checkElement(org.openqa.selenium.By selector, String tag)
Check element.- Parameters:
selector
- selectortag
- tg SeecheckElement(By, int, String)
. Default match timeout is used.
-
checkElement
public 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.- Parameters:
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.- Throws:
com.applitools.eyes.exceptions.TestFailedException
- if a mismatch is detected and immediate failure reports are enabled
-
getViewportSize
public com.applitools.eyes.RectangleSize getViewportSize()
Use this method only if you made a previous call to(WebDriver, String, String)
*** or one of its variants.- Returns:
- the viewport size
-
getViewportSize
public static com.applitools.eyes.RectangleSize getViewportSize(org.openqa.selenium.WebDriver driver)
Call this method if for some reason you don't want to callopen(WebDriver, String, String)
(or one of its variants) yet.- Parameters:
driver
- The driver to use for getting the viewport.- Returns:
- The viewport size of the current context.
-
setViewportSize
public static void setViewportSize(org.openqa.selenium.WebDriver driver, com.applitools.eyes.RectangleSize size)
Set the viewport size using the driver. Call this method if for some reason you don't want to callopen(WebDriver, String, String)
(or one of its variants) yet.- Parameters:
driver
- The driver to use for setting the viewport.size
- The required viewport size.
-
getHideCaret
public boolean getHideCaret()
Gets hide caret.- Returns:
- gets the hide caret flag
-
shouldStitchContent
public boolean shouldStitchContent()
Should stitch content boolean.- Returns:
- the should stitch flag
-
setForceFullPageScreenshot
public void setForceFullPageScreenshot(boolean shouldForce)
Forces a full page screenshot (by scrolling and stitching) if the browser only supports viewport screenshots).- Parameters:
shouldForce
- Whether to force a full page screenshot or not.
-
getForceFullPageScreenshot
public boolean getForceFullPageScreenshot()
Gets force full page screenshot.- Returns:
- Whether SeleniumEyes should force a full page screenshot.
-
setWaitBeforeScreenshots
public 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).- Parameters:
waitBeforeScreenshots
- The time to wait (Milliseconds). Values smaller or equal to 0, will cause the default value to be used.
-
getWaitBeforeScreenshots
public int getWaitBeforeScreenshots()
Gets wait before screenshots.- Returns:
- The time to wait just before taking a screenshot.
-
setScrollToRegion
public void setScrollToRegion(boolean shouldScroll)
Turns on/off the automatic scrolling to a region being checked bycheckRegion
.- Parameters:
shouldScroll
- Whether to automatically scroll to a region being validated.
-
getScrollToRegion
public boolean getScrollToRegion()
Gets scroll to region.- Returns:
- Whether to automatically scroll to a region being validated.
-
setStitchMode
public void setStitchMode(com.applitools.eyes.selenium.StitchMode mode)
Set the type of stitching used for full page screenshots. When the page includes fixed position header/sidebar, useStitchMode.CSS
. Default isStitchMode.SCROLL
.- Parameters:
mode
- The stitch mode to set.
-
getStitchMode
public com.applitools.eyes.selenium.StitchMode getStitchMode()
Gets stitch mode.- Returns:
- The current stitch mode settings.
-
setHideScrollbars
public void setHideScrollbars(boolean shouldHide)
Hide the scrollbars when taking screenshots.- Parameters:
shouldHide
- Whether to hide the scrollbars or not.
-
getHideScrollbars
public boolean getHideScrollbars()
Gets hide scrollbars.- Returns:
- Whether or not scrollbars are hidden when taking screenshots.
-
getRotation
public com.applitools.eyes.selenium.positioning.ImageRotation getRotation()
Gets rotation.- Returns:
- The image rotation model.
-
setRotation
public void setRotation(com.applitools.eyes.selenium.positioning.ImageRotation rotation)
Sets rotation.- Parameters:
rotation
- The image rotation model.
-
getDevicePixelRatio
public double getDevicePixelRatio()
Gets device pixel ratio.- Returns:
- The device pixel ratio, or if the DPR is not known yet or if it wasn't possible to extract it.
-
checkWindow
public void checkWindow()
-
checkWindow
public void checkWindow(String tag)
SeecheckWindow(int, String)
. Default match timeout is used.- Parameters:
tag
- An optional tag to be associated with the snapshot.
-
checkWindow
public void checkWindow(int matchTimeout, String tag)
Takes a snapshot of the application under test and matches it with the expected output.- Parameters:
matchTimeout
- The amount of time to retry matching (Milliseconds).tag
- An optional tag to be associated with the snapshot.- Throws:
com.applitools.eyes.exceptions.TestFailedException
- Thrown if a mismatch is detected and immediate failure reports are enabled.
-
checkWindow
public void checkWindow(String tag, boolean fully)
-
checkFrame
public void checkFrame(String frameNameOrId)
Check frame.- Parameters:
frameNameOrId
- frame to check(name or id) SeecheckFrame(String, int, String)
.tag
defaults tonull
. Default match timeout is used.
-
checkFrame
public void checkFrame(String frameNameOrId, String tag)
Check frame.- Parameters:
frameNameOrId
- frame to check(name or id)tag
- SeecheckFrame(String, int, String)
. Default match timeout is used.
-
checkFrame
public 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.- Parameters:
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.
-
checkFrame
public void checkFrame(int frameIndex)
Check frame.- Parameters:
frameIndex
- index of frame SeecheckFrame(int, int, String)
.tag
defaults tonull
. Default match timeout is used.
-
checkFrame
public void checkFrame(int frameIndex, String tag)
Check frame.- Parameters:
frameIndex
- index of frametag
- SeecheckFrame(int, int, String)
. Default match timeout is used.
-
checkFrame
public 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.- Parameters:
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.
-
checkFrame
public void checkFrame(org.openqa.selenium.WebElement frameReference)
Check frame.- Parameters:
frameReference
- web element to check SeecheckFrame(WebElement, int, String)
.tag
defaults tonull
. Default match timeout is used.
-
checkFrame
public void checkFrame(org.openqa.selenium.WebElement frameReference, String tag)
Check frame.- Parameters:
frameReference
- web element to checktag
- tag SeecheckFrame(WebElement, int, String)
. Default match timeout is used.
-
checkFrame
public 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.- Parameters:
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.
-
checkFrame
public 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.- Parameters:
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.
-
checkFrame
public void checkFrame(String[] framesPath, String tag)
SeecheckFrame(String[], int, String)
. Default match timeout is used.- Parameters:
framesPath
- the frames pathtag
- the tag
-
checkFrame
public void checkFrame(String[] framesPath)
- Parameters:
framesPath
- the frames path
-
getServerUrl
public URI getServerUrl()
Gets server url.- Specified by:
getServerUrl
in interfacecom.applitools.eyes.IEyesBase
- Returns:
- The URI of the eyes server.
-
setAgentId
public void setAgentId(String agentId)
Sets the user given agent id of the SDK.null
is referred to as no id.- Parameters:
agentId
- The agent ID to set.
-
getAgentId
public String getAgentId()
Gets agent id.- Returns:
- The user given agent id of the SDK.
-
getProxy
public com.applitools.eyes.AbstractProxySettings getProxy()
Gets proxy.- Returns:
- The current proxy settings used by the server connector, or
null
if no proxy is set.
-
setAppName
public void setAppName(String appName)
Sets app name.- Parameters:
appName
- The name of the application under test.
-
getAppName
public String getAppName()
Gets app name.- Returns:
- The name of the application under test.
-
getHostOS
public String getHostOS()
Gets host os.- Returns:
- the host os
-
getHostApp
public String getHostApp()
Gets host app.- Returns:
- The application name running the AUT.
-
setBaselineName
public void setBaselineName(String baselineName)
Deprecated.Only available for backward compatibility. SeesetBaselineEnvName(String)
.Sets baseline name.- Parameters:
baselineName
- If specified, determines the baseline to compare with and disables automatic baseline inference.
-
getBaselineName
public String getBaselineName()
Deprecated.Only available for backward compatibility. SeegetBaselineEnvName()
.Gets baseline name.- Returns:
- The baseline name, if specified.
-
setBaselineEnvName
public void setBaselineEnvName(String baselineEnvName)
If notnull
, determines the name of the environment of the baseline.- Parameters:
baselineEnvName
- The name of the baseline's environment.
-
getBaselineEnvName
public String getBaselineEnvName()
If notnull
, determines the name of the environment of the baseline.- Returns:
- The name of the baseline's environment, or
null
if no such name was set.
-
setEnvName
public void setEnvName(String envName)
If notnull
specifies a name for the environment in which the application under test is running.- Parameters:
envName
- The name of the environment of the baseline.
-
getEnvName
public String getEnvName()
If notnull
specifies a name for the environment in which the application under test is running.- Returns:
- The name of the environment of the baseline, or
null
if no such name was set.
-
getPositionProvider
@Deprecated public com.applitools.eyes.positioning.PositionProvider getPositionProvider()
Deprecated.Gets position provider.- Returns:
- The currently set position provider.
-
setPositionProvider
@Deprecated public void setPositionProvider(com.applitools.eyes.positioning.PositionProvider positionProvider)
Deprecated.Sets position provider.- Parameters:
positionProvider
- The position provider to be used.
-
setExplicitViewportSize
@Deprecated public void setExplicitViewportSize(com.applitools.eyes.RectangleSize explicitViewportSize)
Deprecated.Sets explicit viewport size.- Parameters:
explicitViewportSize
- sets the viewport
-
log
public void log(String message)
Log.- Parameters:
message
- the massage to log
-
isSendDom
public boolean isSendDom()
Is send dom boolean.- Returns:
- sendDom flag
-
setSendDom
public void setSendDom(boolean isSendDom)
Sets send dom.- Parameters:
isSendDom
- should send dom flag
-
setHostOS
public void setHostOS(String hostOS)
Sets host os.- Parameters:
hostOS
- the hosting host
-
setHostApp
public void setHostApp(String hostApp)
Sets host app.- Parameters:
hostApp
- The application running the AUT (e.g., Chrome).
-
getBranchName
public String getBranchName()
Gets branch name.- Returns:
- The current branch (see
setBranchName(String)
).
-
getParentBranchName
public String getParentBranchName()
Gets parent branch name.- Returns:
- The name of the current parent branch under which new branches will be created. (see
setParentBranchName(String)
).
-
setBaselineBranchName
public void setBaselineBranchName(String branchName)
Sets the branch under which new branches are created. (seesetBranchName(String)
***.- Parameters:
branchName
- Branch name ornull
to specify the default branch.
-
getBaselineBranchName
public String getBaselineBranchName()
Gets baseline branch name.- Returns:
- The name of the current parent branch under which new branches will be created. (see
setBaselineBranchName(String)
).
-
setSaveDiffs
public void setSaveDiffs(Boolean saveDiffs)
Automatically save differences as a baseline.- Parameters:
saveDiffs
- Sets whether to automatically save differences as baseline.
-
getSaveDiffs
public Boolean getSaveDiffs()
Returns whether to automatically save differences as a baseline.- Returns:
- Whether to automatically save differences as baseline.
-
setIgnoreDisplacements
public void setIgnoreDisplacements(boolean isIgnoreDisplacements)
-
getIgnoreDisplacements
public boolean getIgnoreDisplacements()
-
setDebugResourceWriter
@Deprecated public void setDebugResourceWriter(com.applitools.eyes.visualgrid.model.IDebugResourceWriter debugResourceWriter)
Deprecated.
-
setAppEnvironment
@Deprecated public void setAppEnvironment(String hostOS, String hostApp)
Deprecated.Superseded bysetHostOS(String)
andsetHostApp(String)
. Sets the OS (e.g., Windows) and application (e.g., Chrome) that host the application under test.- Parameters:
hostOS
- The name of the OS hosting the application under test ornull
to auto-detect.hostApp
- The name of the application hosting the application under test ornull
to auto-detect.
-
getDriver
public org.openqa.selenium.WebDriver getDriver()
Gets driver.- Returns:
- the driver
-
getCurrentFramePositionProvider
@Deprecated public com.applitools.eyes.positioning.PositionProvider getCurrentFramePositionProvider()
Deprecated.Gets current frame position provider.- Returns:
- get Current Frame Position Provider
-
getRegionToCheck
@Deprecated public com.applitools.eyes.Region getRegionToCheck()
Deprecated.Gets region to check.- Returns:
- the region to check
-
setRegionToCheck
@Deprecated public void setRegionToCheck(com.applitools.eyes.Region regionToCheck)
Deprecated.Sets region to check.- Parameters:
regionToCheck
- the region to check
-
getCurrentFrameScrollRootElement
@Deprecated public org.openqa.selenium.WebElement getCurrentFrameScrollRootElement()
Deprecated.Gets current frame scroll root element.- Returns:
- the current scroll root web element
-
getConfiguration
public com.applitools.eyes.selenium.Configuration getConfiguration()
-
setConfiguration
public void setConfiguration(com.applitools.eyes.config.Configuration configuration)
-
closeAsync
public void closeAsync()
- Specified by:
closeAsync
in interfacecom.applitools.eyes.IEyesBase
-
locate
public Map<String,List<com.applitools.eyes.Region>> locate(com.applitools.eyes.locators.VisualLocatorSettings visualLocatorSettings)
-
extractTextRegions
public Map<String,List<com.applitools.eyes.locators.TextRegion>> extractTextRegions(com.applitools.eyes.locators.TextRegionSettings textRegionSettings)
-
extractText
public List<String> extractText(com.applitools.eyes.locators.BaseOcrRegion... ocrRegions)
-
getEyesRef
public com.applitools.eyes.universal.Reference getEyesRef()
-
configure
public com.applitools.eyes.config.Configuration configure()
-
-