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.TestResultsabort()voidabortAsync()com.applitools.eyes.TestResultsabortIfNotClosed()If a test is running, aborts it.voidaddProperty(String name, String value)Adds a property to be sent to the server.voidcheck(com.applitools.ICheckSettings checkSettings)Check.voidcheck(com.applitools.ICheckSettings... checkSettings)Takes multiple screenshots at once (given allICheckSettingsobjects are on the same level).voidcheck(String tag, com.applitools.ICheckSettings checkSettings)Check.voidcheckElement(org.openqa.selenium.By selector)Check element.voidcheckElement(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.voidcheckElement(org.openqa.selenium.By selector, String tag)Check element.voidcheckElement(org.openqa.selenium.WebElement element)voidcheckElement(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.voidcheckElement(org.openqa.selenium.WebElement element, String tag)Check element.voidcheckFrame(int frameIndex)Check frame.voidcheckFrame(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.voidcheckFrame(int frameIndex, String tag)Check frame.voidcheckFrame(String frameNameOrId)Check frame.voidcheckFrame(String[] framesPath)voidcheckFrame(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.voidcheckFrame(String[] framesPath, String tag)voidcheckFrame(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.voidcheckFrame(String frameNameOrId, String tag)Check frame.voidcheckFrame(org.openqa.selenium.WebElement frameReference)Check frame.voidcheckFrame(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.voidcheckFrame(org.openqa.selenium.WebElement frameReference, String tag)Check frame.voidcheckRegion(com.applitools.eyes.Region region)Check region.voidcheckRegion(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.voidcheckRegion(org.openqa.selenium.By selector)voidcheckRegion(org.openqa.selenium.By selector, boolean stitchContent)voidcheckRegion(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.voidcheckRegion(org.openqa.selenium.By selector, int matchTimeout, String tag, boolean stitchContent)voidcheckRegion(org.openqa.selenium.By selector, String tag)voidcheckRegion(org.openqa.selenium.By selector, String tag, boolean stitchContent)voidcheckRegion(org.openqa.selenium.WebElement element)voidcheckRegion(org.openqa.selenium.WebElement element, boolean stitchContent)IfstitchContentisfalsethen behaves the same ascheckRegion(WebElement), otherwise behaves the same ascheckElement(WebElement).voidcheckRegion(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.voidcheckRegion(org.openqa.selenium.WebElement element, int matchTimeout, String tag, boolean stitchContent)voidcheckRegion(org.openqa.selenium.WebElement element, String tag)voidcheckRegion(org.openqa.selenium.WebElement element, String tag, boolean stitchContent)voidcheckRegionInFrame(int frameIndex, org.openqa.selenium.By selector)voidcheckRegionInFrame(int frameIndex, org.openqa.selenium.By selector, boolean stitchContent)voidcheckRegionInFrame(int frameIndex, org.openqa.selenium.By selector, int matchTimeout, String tag)voidcheckRegionInFrame(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.voidcheckRegionInFrame(int frameIndex, org.openqa.selenium.By selector, String tag)voidcheckRegionInFrame(int frameIndex, org.openqa.selenium.By selector, String tag, boolean stitchContent)voidcheckRegionInFrame(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.voidcheckRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector)voidcheckRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, boolean stitchContent)voidcheckRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, int matchTimeout, boolean stitchContent)voidcheckRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, int matchTimeout, String tag)voidcheckRegionInFrame(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.voidcheckRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, String tag)voidcheckRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, String tag, boolean stitchContent)voidcheckRegionInFrame(org.openqa.selenium.WebElement frameReference, org.openqa.selenium.By selector)voidcheckRegionInFrame(org.openqa.selenium.WebElement frameReference, org.openqa.selenium.By selector, boolean stitchContent)voidcheckRegionInFrame(org.openqa.selenium.WebElement frameReference, org.openqa.selenium.By selector, int matchTimeout, String tag)voidcheckRegionInFrame(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.voidcheckRegionInFrame(org.openqa.selenium.WebElement frameReference, org.openqa.selenium.By selector, String tag)voidcheckRegionInFrame(org.openqa.selenium.WebElement frameReference, org.openqa.selenium.By selector, String tag, boolean stitchContent)voidcheckWindow()SeecheckWindow(String).voidcheckWindow(int matchTimeout, String tag)Takes a snapshot of the application under test and matches it with the expected output.voidcheckWindow(String tag)voidcheckWindow(String tag, boolean fully)voidclearProperties()Clears the list of custom properties.com.applitools.eyes.TestResultsclose()Seeclose(boolean).com.applitools.eyes.TestResultsclose(boolean shouldThrowException)Close test results.voidcloseAsync()com.applitools.eyes.config.Configurationconfigure()List<String>extractText(com.applitools.eyes.locators.BaseOcrRegion... ocrRegions)Map<String,List<com.applitools.eyes.locators.TextRegion>>extractTextRegions(com.applitools.eyes.locators.TextRegionSettings textRegionSettings)StringgetAgentId()Gets agent id.StringgetApiKey()Gets api key.StringgetAppName()Gets app name.StringgetBaselineBranchName()Gets baseline branch name.StringgetBaselineEnvName()If notnull, determines the name of the environment of the baseline.StringgetBaselineName()Deprecated.Only available for backward compatibility.com.applitools.eyes.BatchInfogetBatch()Gets batch.StringgetBranchName()Gets branch name.com.applitools.eyes.selenium.ConfigurationgetConfiguration()com.applitools.eyes.positioning.PositionProvidergetCurrentFramePositionProvider()Deprecated.org.openqa.selenium.WebElementgetCurrentFrameScrollRootElement()Deprecated.StringgetDebugScreenshotsPath()Gets debug screenshots path.StringgetDebugScreenshotsPrefix()Gets debug screenshots prefix.com.applitools.eyes.debug.DebugScreenshotsProvidergetDebugScreenshotsProvider()Gets debug screenshots provider.com.applitools.eyes.ImageMatchSettingsgetDefaultMatchSettings()Gets default match settings.static URIgetDefaultServerUrl()Gets default server url.doublegetDevicePixelRatio()Gets device pixel ratio.org.openqa.selenium.WebDrivergetDriver()Gets driver.StringgetEnvName()If notnullspecifies a name for the environment in which the application under test is running.static StringgetExecutionCloudURL()Get the Execution Cloud URL.com.applitools.eyes.universal.ReferencegetEyesRef()com.applitools.eyes.FailureReportsgetFailureReports()Gets failure reports.booleangetForceFullPageScreenshot()Gets force full page screenshot.StringgetFullAgentId()Gets full agent id.booleangetHideCaret()Gets hide caret.booleangetHideScrollbars()Gets hide scrollbars.StringgetHostApp()Gets host app.StringgetHostOS()Gets host os.booleangetIgnoreCaret()Gets ignore caret.booleangetIgnoreDisplacements()booleangetIsCutProviderExplicitlySet()Gets is cut provider explicitly set.BooleangetIsDisabled()Gets is disabled.booleangetIsOpen()Gets is open.com.applitools.eyes.LoggergetLogger()Gets logger.com.applitools.eyes.LogHandlergetLogHandler()Gets log handler.com.applitools.eyes.MatchLevelgetMatchLevel()Deprecated.Please usegetDefaultMatchSettings()instead.intgetMatchTimeout()Gets match timeout.StringgetParentBranchName()Gets parent branch name.com.applitools.eyes.positioning.PositionProvidergetPositionProvider()Deprecated.com.applitools.eyes.AbstractProxySettingsgetProxy()Gets proxy.com.applitools.eyes.RegiongetRegionToCheck()Deprecated.com.applitools.eyes.selenium.positioning.ImageRotationgetRotation()Gets rotation.BooleangetSaveDebugScreenshots()Gets save debug screenshots.BooleangetSaveDiffs()Returns whether to automatically save differences as a baseline.booleangetSaveFailedTests()Gets save failed tests.booleangetSaveNewTests()Gets save new tests.DoublegetScaleRatio()Gets scale ratio.booleangetScrollToRegion()Gets scroll to region.URIgetServerUrl()Gets server url.com.applitools.eyes.selenium.StitchModegetStitchMode()Gets stitch mode.intgetStitchOverlap()Gets stitch overlap.com.applitools.eyes.RectangleSizegetViewportSize()Use this method only if you made a previous call to(WebDriver, String, String)*** or one of its variants.static com.applitools.eyes.RectangleSizegetViewportSize(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.intgetWaitBeforeScreenshots()Gets wait before screenshots.booleanisSendDom()Is send dom boolean.Map<String,List<com.applitools.eyes.Region>>locate(com.applitools.eyes.locators.VisualLocatorSettings visualLocatorSettings)voidlog(String message)Log.voidopen(String appName, String testName)Starts a test without a drivervoidopen(String appName, String testName, com.applitools.eyes.RectangleSize viewportSize)Starts a test without a driverorg.openqa.selenium.WebDriveropen(org.openqa.selenium.WebDriver webDriver)Open web driver.org.openqa.selenium.WebDriveropen(org.openqa.selenium.WebDriver driver, String appName, String testName)Starts a test.org.openqa.selenium.WebDriveropen(org.openqa.selenium.WebDriver driver, String appName, String testName, com.applitools.eyes.RectangleSize viewportSize)Starts a test.voidsetAgentId(String agentId)Sets the user given agent id of the SDK.voidsetApiKey(String apiKey)Sets api key.voidsetAppEnvironment(String hostOS, String hostApp)Deprecated.voidsetAppName(String appName)Sets app name.voidsetBaselineBranchName(String branchName)Sets the branch under which new branches are created.voidsetBaselineEnvName(String baselineEnvName)If notnull, determines the name of the environment of the baseline.voidsetBaselineName(String baselineName)Deprecated.Only available for backward compatibility.voidsetBatch(com.applitools.eyes.BatchInfo batch)Sets the batch in which context future tests will run ornullif tests are to run standalone.voidsetBranchName(String branchName)Sets branch name.voidsetConfiguration(com.applitools.eyes.config.Configuration configuration)voidsetDebugResourceWriter(com.applitools.eyes.visualgrid.model.IDebugResourceWriter debugResourceWriter)Deprecated.voidsetDebugScreenshotsPath(String pathToSave)Sets debug screenshots path.voidsetDebugScreenshotsPrefix(String prefix)Sets debug screenshots prefix.voidsetDefaultMatchSettings(com.applitools.eyes.ImageMatchSettings defaultMatchSettings)Updates the match settings to be used for the session.voidsetEnvName(String envName)If notnullspecifies a name for the environment in which the application under test is running.voidsetExplicitViewportSize(com.applitools.eyes.RectangleSize explicitViewportSize)Deprecated.voidsetFailureReports(com.applitools.eyes.FailureReports failureReports)Sets failure reports.voidsetForceFullPageScreenshot(boolean shouldForce)Forces a full page screenshot (by scrolling and stitching) if the browser only supports viewport screenshots).voidsetHideCaret(boolean hideCaret)Sets hide caret.voidsetHideScrollbars(boolean shouldHide)Hide the scrollbars when taking screenshots.voidsetHostApp(String hostApp)Sets host app.voidsetHostOS(String hostOS)Sets host os.voidsetIgnoreCaret(boolean value)Sets the ignore blinking caret value.voidsetIgnoreDisplacements(boolean isIgnoreDisplacements)voidsetImageCut(com.applitools.eyes.CutProvider cutProvider)Manually set the the sizes to cut from an image before it's validated.voidsetIsDisabled(Boolean isDisabled)Sets is disabled.voidsetLogHandler(com.applitools.eyes.LogHandler logHandler)Sets a handler of log messages generated by this API.voidsetMatchLevel(com.applitools.eyes.MatchLevel matchLevel)This function is deprecated.voidsetMatchTimeout(int ms)Sets the maximum time (in ms) a match operation tries to perform a match.voidsetParentBranchName(String branchName)Sets parent branch name.voidsetPositionProvider(com.applitools.eyes.positioning.PositionProvider positionProvider)Deprecated.voidsetProxy(com.applitools.eyes.AbstractProxySettings proxySettings)Sets the proxy settings to be used by the rest client.voidsetRegionToCheck(com.applitools.eyes.Region regionToCheck)Deprecated.voidsetRotation(com.applitools.eyes.selenium.positioning.ImageRotation rotation)Sets rotation.voidsetSaveDebugScreenshots(Boolean saveDebugScreenshots)Sets save debug screenshots.voidsetSaveDiffs(Boolean saveDiffs)Automatically save differences as a baseline.voidsetSaveFailedTests(boolean saveFailedTests)Set whether or not failed tests are saved by default.voidsetSaveNewTests(boolean saveNewTests)Set whether or not new tests are saved by default.voidsetScaleRatio(Double scaleRatio)Manually set the scale ratio for the images being validated.voidsetScrollToRegion(boolean shouldScroll)Turns on/off the automatic scrolling to a region being checked bycheckRegion.voidsetSendDom(boolean isSendDom)Sets send dom.voidsetServerUrl(String serverUrl)Sets server url.voidsetServerUrl(URI serverUri)Sets server url.voidsetStitchMode(com.applitools.eyes.selenium.StitchMode mode)Set the type of stitching used for full page screenshots.voidsetStitchOverlap(int pixels)Sets the stitching overlap in pixels.static voidsetViewportSize(org.openqa.selenium.WebDriver driver, com.applitools.eyes.RectangleSize size)Set the viewport size using the driver.voidsetWaitBeforeScreenshots(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).booleanshouldStitchContent()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) ornullto 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) ornullto 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) ornullto use the current window's viewport.viewportSize- The required browser's viewport size (i.e., the visible part of the document's body) ornullto 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) ornullto use the current window's viewport.- Returns:
- A wrapped WebDriver which enables SeleniumEyes trigger recording and frame handling.
sessionTypedefaults 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. Ifnullthen no proxy is set.
-
setIsDisabled
public void setIsDisabled(Boolean isDisabled)
Sets is disabled.- Specified by:
setIsDisabledin 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.- Parameters:
checkSettings- the check settings
-
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:
abortIfNotClosedin interfacecom.applitools.eyes.IEyesBase
-
abort
public com.applitools.eyes.TestResults abort()
- Specified by:
abortin interfacecom.applitools.eyes.IEyesBase
-
abortAsync
public void abortAsync()
- Specified by:
abortAsyncin interfacecom.applitools.eyes.IEyesBase
-
getIsDisabled
public Boolean getIsDisabled()
Gets is disabled.- Specified by:
getIsDisabledin interfacecom.applitools.eyes.IEyesBase- Returns:
- Whether eyes is disabled.
-
getApiKey
public String getApiKey()
Gets api key.- Specified by:
getApiKeyin 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 ornullif 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:
getFullAgentIdin 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:
getIsOpenin 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:
setLogHandlerin 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:
getLogHandlerin interfacecom.applitools.eyes.IEyesBase- Returns:
- The currently set log handler.
-
getLogger
public com.applitools.eyes.Logger getLogger()
Gets logger.- Specified by:
getLoggerin 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, ornullto 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:
addPropertyin 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:
clearPropertiesin 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).tagdefaults tonull. Default match timeout is used.
-
checkRegion
public void checkRegion(com.applitools.eyes.Region region, int matchTimeout, String tag) throws com.applitools.eyes.exceptions.TestFailedExceptionTakes 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)IfstitchContentisfalsethen 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)ifstitchContentisfalsethen 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)ifstitchContentisfalsethen 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)IfstitchContentisfalsethen 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)IfstitchContentisfalsethen 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)IfstitchContentistruethen 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).tagdefaults 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)
-
check
public void check(com.applitools.ICheckSettings... checkSettings)
Takes multiple screenshots at once (given allICheckSettingsobjects are on the same level).- Parameters:
checkSettings- MultipleICheckSettingsobject representing different regions in the viewport.
-
checkFrame
public void checkFrame(String frameNameOrId)
Check frame.- Parameters:
frameNameOrId- frame to check(name or id) SeecheckFrame(String, int, String).tagdefaults 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).tagdefaults 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).tagdefaults 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:
getServerUrlin 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.nullis 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
nullif 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
nullif no such name was set.
-
setEnvName
public void setEnvName(String envName)
If notnullspecifies 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 notnullspecifies a name for the environment in which the application under test is running.- Returns:
- The name of the environment of the baseline, or
nullif 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 ornullto 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 ornullto auto-detect.hostApp- The name of the application hosting the application under test ornullto 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:
closeAsyncin 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()
-
-