Package com.applitools.eyes.appium
Class Eyes
java.lang.Object
com.applitools.eyes.appium.Eyes
- All Implemented Interfaces:
com.applitools.eyes.IEyesBase
-
Field Summary
Fields inherited from interface com.applitools.eyes.IEyesBase
APPLITOOLS_PUBLIC_CLOUD_URL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.applitools.eyes.TestResultsabort()voidcom.applitools.eyes.TestResultsIf 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 an array of targets.voidcheck(com.applitools.ICheckSettings checkSettings, com.applitools.ICheckSettings... additionalSettings) Check one or more targets.voidvoidcheckElement(org.openqa.selenium.By selector) voidcheckElement(org.openqa.selenium.By selector, int matchTimeout, String tag) voidcheckElement(org.openqa.selenium.By selector, String tag) voidcheckElement(org.openqa.selenium.WebElement element) voidcheckElement(org.openqa.selenium.WebElement element, int matchTimeout, String tag) voidcheckElement(org.openqa.selenium.WebElement element, String tag) voidcheckRegion(com.applitools.eyes.Region region) voidcheckRegion(com.applitools.eyes.Region region, int matchTimeout, String tag) voidcheckRegion(org.openqa.selenium.By selector) voidcheckRegion(org.openqa.selenium.By selector, boolean stitchContent) voidcheckRegion(org.openqa.selenium.By selector, int matchTimeout, String tag) 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, int matchTimeout, String tag) voidcheckRegion(org.openqa.selenium.WebElement element, int matchTimeout, String tag, boolean stitchContent) voidcheckRegion(org.openqa.selenium.WebElement element, String tag, boolean stitchContent) voidvoidcheckWindow(int matchTimeout, String tag) voidcheckWindow(String tag) voidcheckWindow(String tag, boolean fully) voidClears the list of custom properties.com.applitools.eyes.TestResultsclose()Seeclose(boolean).com.applitools.eyes.TestResultsclose(boolean shouldThrowException) Close test results.voidcom.applitools.eyes.config.ConfigurationextractText(com.applitools.eyes.locators.BaseOcrRegion... ocrRegions) extractTextRegions(com.applitools.eyes.locators.TextRegionSettings textRegionSettings) Gets api key.com.applitools.eyes.BatchInfogetBatch()com.applitools.eyes.selenium.Configurationprotected com.applitools.eyes.config.ConfigurationDeprecated.com.applitools.eyes.ImageMatchSettingsdoubleorg.openqa.selenium.WebDriverGets full agent id.Gets is disabled.booleanGets is open.com.applitools.eyes.LoggerGets logger.com.applitools.eyes.LogHandlerGets log handler.com.applitools.eyes.MatchLevelcom.applitools.eyes.positioning.PositionProviderGets position provider.com.applitools.eyes.AbstractProxySettingsgetProxy()Gets proxy.List<com.applitools.eyes.TestResults> List<com.applitools.eyes.TestResults> getResults(boolean shouldThrowException) com.applitools.eyes.selenium.positioning.ImageRotationGets save debug screenshots.Gets save new tests.Gets scale ratio.booleanDeprecated.Gets stitch overlap.locate(com.applitools.eyes.locators.VisualLocatorSettings visualLocatorSettings) org.openqa.selenium.WebDriveropen(org.openqa.selenium.WebDriver driver, com.applitools.eyes.config.Configuration configuration) org.openqa.selenium.WebDriverorg.openqa.selenium.WebDriveropen(org.openqa.selenium.WebDriver driver, String appName, String testName, com.applitools.eyes.RectangleSize viewportSize) protected org.openqa.selenium.WebDriveropen(org.openqa.selenium.WebDriver driver, String appName, String testName, com.applitools.eyes.RectangleSize viewportSize, com.applitools.eyes.SessionType sessionType) Starts a test.voidsetAgentId(String agentId) voidSets api key.voidsetBaselineBranchName(String branchName) voidsetBaselineEnvName(String baselineEnvName) com.applitools.eyes.config.ConfigurationsetBatch(com.applitools.eyes.BatchInfo batch) voidsetBranchName(String branchName) voidsetConfiguration(com.applitools.eyes.config.Configuration configuration) voidsetDefaultMatchSettings(com.applitools.eyes.ImageMatchSettings defaultMatchSettings) voidsetEnvName(String envName) voidsetForceFullPageScreenshot(boolean shouldForce) voidsetHostApp(String hostApp) voidvoidsetIgnoreCaret(boolean value) voidsetIgnoreDisplacements(boolean isIgnoreDisplacements) 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) voidsetMatchTimeout(int ms) Sets the maximum time (in ms) a match operation tries to perform a match.static voidsetMobileCapabilities(org.openqa.selenium.MutableCapabilities caps) static voidsetMobileCapabilities(org.openqa.selenium.MutableCapabilities caps, String apiKey) static voidsetMobileCapabilities(org.openqa.selenium.MutableCapabilities caps, String apiKey, String eyesServerUrl) static voidsetMobileCapabilities(org.openqa.selenium.MutableCapabilities caps, String apiKey, String eyesServerUrl, com.applitools.eyes.ProxySettings proxySettings) static voidsetMobileCapabilities(org.openqa.selenium.remote.DesiredCapabilities caps) static voidsetMobileCapabilities(org.openqa.selenium.remote.DesiredCapabilities caps, String apiKey) static voidsetMobileCapabilities(org.openqa.selenium.remote.DesiredCapabilities caps, String apiKey, String eyesServerUrl) static voidsetMobileCapabilities(org.openqa.selenium.remote.DesiredCapabilities caps, String apiKey, String eyesServerUrl, com.applitools.eyes.ProxySettings proxySettings) static voidsetNMGCapabilities(org.openqa.selenium.remote.DesiredCapabilities caps) static voidsetNMGCapabilities(org.openqa.selenium.remote.DesiredCapabilities caps, String apiKey) static voidsetNMGCapabilities(org.openqa.selenium.remote.DesiredCapabilities caps, String apiKey, String eyesServerUrl) static voidsetNMGCapabilities(org.openqa.selenium.remote.DesiredCapabilities caps, String apiKey, String eyesServerUrl, com.applitools.eyes.ProxySettings proxySettings) voidsetParentBranchName(String branchName) voidsetPositionProvider(com.applitools.eyes.positioning.PositionProvider positionProvider) Sets position provider.voidsetProxy(com.applitools.eyes.AbstractProxySettings proxySettings) Sets the proxy settings to be used by the server.voidsetRotation(com.applitools.eyes.selenium.positioning.ImageRotation rotation) voidsetSaveDebugScreenshots(Boolean saveDebugScreenshots) Sets save debug screenshots.voidsetSaveDiffs(Boolean saveDiffs) 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) Deprecated.voidsetServerUrl(String serverUrl) Sets server url.voidsetServerUrl(URI serverUri) Sets server url.voidsetStitchOverlap(int pixels) Sets the stitching overlap in pixels.boolean
-
Constructor Details
-
Eyes
public Eyes()Instantiates a new Eyes. -
Eyes
public Eyes(com.applitools.eyes.EyesRunner runner0) Instantiates a new Eyes.- Parameters:
runner0- the runner
-
-
Method Details
-
setNMGCapabilities
public static void setNMGCapabilities(org.openqa.selenium.remote.DesiredCapabilities caps) -
setNMGCapabilities
public static void setNMGCapabilities(org.openqa.selenium.remote.DesiredCapabilities caps, String apiKey) -
setNMGCapabilities
-
setNMGCapabilities
-
setMobileCapabilities
public static void setMobileCapabilities(org.openqa.selenium.remote.DesiredCapabilities caps) -
setMobileCapabilities
public static void setMobileCapabilities(org.openqa.selenium.remote.DesiredCapabilities caps, String apiKey) -
setMobileCapabilities
-
setMobileCapabilities
-
setMobileCapabilities
public static void setMobileCapabilities(org.openqa.selenium.MutableCapabilities caps) -
setMobileCapabilities
public static void setMobileCapabilities(org.openqa.selenium.MutableCapabilities caps, String apiKey) -
setMobileCapabilities
-
setMobileCapabilities
-
getConfiguration
public com.applitools.eyes.selenium.Configuration getConfiguration() -
setConfiguration
public void setConfiguration(com.applitools.eyes.config.Configuration configuration) -
configure
public com.applitools.eyes.config.Configuration configure() -
getApiKey
Gets api key.- Specified by:
getApiKeyin interfacecom.applitools.eyes.IEyesBase- Returns:
- the api key
-
setApiKey
-
getServerUrl
- Specified by:
getServerUrlin interfacecom.applitools.eyes.IEyesBase
-
setServerUrl
-
setServerUrl
-
setProxy
public void setProxy(com.applitools.eyes.AbstractProxySettings proxySettings) Sets the proxy settings to be used by the server.- Parameters:
proxySettings- The proxy settings to be used by the server. Ifnullthen no proxy is set.
-
getProxy
public com.applitools.eyes.AbstractProxySettings getProxy()Gets proxy.- Returns:
- The current proxy settings used by the server, or
nullif no proxy is set.
-
setIsDisabled
Sets is disabled.- Specified by:
setIsDisabledin interfacecom.applitools.eyes.IEyesBase- Parameters:
isDisabled- If true, all interactions with this API will be silently ignored.
-
getIsDisabled
Gets is disabled.- Specified by:
getIsDisabledin interfacecom.applitools.eyes.IEyesBase- Returns:
- Whether eyes is disabled.
-
getRotation
public com.applitools.eyes.selenium.positioning.ImageRotation getRotation()- Returns:
- The image rotation data.
-
setRotation
public void setRotation(com.applitools.eyes.selenium.positioning.ImageRotation rotation) - Parameters:
rotation- The image rotation data.
-
setForceFullPageScreenshot
public void setForceFullPageScreenshot(boolean shouldForce) -
getForceFullPageScreenshot
-
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
- Returns:
- The maximum time in ms (RegionProvider, String, boolean, int)} 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
Gets save new tests.- Returns:
- True if new tests are saved by default.
-
setSaveDiffs
-
getSaveDiffs
-
setDefaultMatchSettings
public void setDefaultMatchSettings(com.applitools.eyes.ImageMatchSettings defaultMatchSettings) -
getDefaultMatchSettings
public com.applitools.eyes.ImageMatchSettings getDefaultMatchSettings() -
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.
-
setBranchName
-
getBranchName
-
setParentBranchName
-
getParentBranchName
-
setBatch
public com.applitools.eyes.config.Configuration setBatch(com.applitools.eyes.BatchInfo batch) -
getBatch
public com.applitools.eyes.BatchInfo getBatch() -
setAgentId
-
getAgentId
-
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.
-
setHostOS
-
getHostOS
-
setHostApp
-
getHostApp
-
getIgnoreCaret
-
setIgnoreCaret
public void setIgnoreCaret(boolean value) -
setMatchLevel
public void setMatchLevel(com.applitools.eyes.MatchLevel matchLevel) -
getMatchLevel
public com.applitools.eyes.MatchLevel getMatchLevel() -
setEnvName
-
getEnvName
-
setBaselineEnvName
-
getBaselineEnvName
-
setBaselineBranchName
-
getBaselineBranchName
-
setIgnoreDisplacements
public void setIgnoreDisplacements(boolean isIgnoreDisplacements) -
getIgnoreDisplacements
-
open
public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver, com.applitools.eyes.config.Configuration configuration) -
open
public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver, String appName, String testName, com.applitools.eyes.RectangleSize viewportSize) Seeopen(WebDriver, String, String, RectangleSize, SessionType).sessionTypedefaults tonull. * @param driver The web driver that controls the browser hosting the application under test.- 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.- Returns:
- A wrapped WebDriver which enables SeleniumEyes trigger recording and frame handling.
-
open
-
open
protected org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver, String appName, String testName, com.applitools.eyes.RectangleSize viewportSize, com.applitools.eyes.SessionType sessionType) 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.sessionType- Should always beSEQUENTIAL- Returns:
- A wrapped WebDriver which enables Eyes trigger recording and frame handling.
-
getIsOpen
public boolean getIsOpen()Gets is open.- Specified by:
getIsOpenin interfacecom.applitools.eyes.IEyesBase- Returns:
- Whether a session is open.
-
checkWindow
public void checkWindow() -
checkWindow
-
checkWindow
-
checkWindow
-
check
-
setScrollToRegion
Deprecated. -
getScrollToRegion
Deprecated.Gets scroll to region.- Returns:
- Whether to automatically scroll to a region being validated.
-
shouldStitchContent
public boolean shouldStitchContent() -
getPositionProvider
public com.applitools.eyes.positioning.PositionProvider getPositionProvider()Gets position provider.- Returns:
- The currently set position provider.
-
setPositionProvider
public void setPositionProvider(com.applitools.eyes.positioning.PositionProvider positionProvider) Sets position provider.- Parameters:
positionProvider- The position provider to be used.
-
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
-
addProperty
-
clearProperties
public void clearProperties()Clears the list of custom properties.- Specified by:
clearPropertiesin interfacecom.applitools.eyes.IEyesBase
-
setSaveDebugScreenshots
Sets save debug screenshots.- Parameters:
saveDebugScreenshots- If true, will save all screenshots to local directory.
-
getSaveDebugScreenshots
Gets save debug screenshots.- Returns:
- True if screenshots saving enabled.
-
getBaseAgentId
-
getDriver
public org.openqa.selenium.WebDriver getDriver() -
getDevicePixelRatio
public double getDevicePixelRatio() -
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.
-
checkElement
public void checkElement(org.openqa.selenium.WebElement element) -
checkElement
-
checkElement
-
checkElement
public void checkElement(org.openqa.selenium.By selector) -
checkElement
-
checkElement
-
checkRegion
public void checkRegion(com.applitools.eyes.Region region) -
checkRegion
public void checkRegion(com.applitools.eyes.Region region, int matchTimeout, String tag) throws com.applitools.eyes.exceptions.TestFailedException - Throws:
com.applitools.eyes.exceptions.TestFailedException
-
checkRegion
public void checkRegion(org.openqa.selenium.WebElement element) -
checkRegion
-
checkRegion
-
checkRegion
public void checkRegion(org.openqa.selenium.WebElement element, int matchTimeout, String tag, boolean stitchContent) -
checkRegion
public void checkRegion(org.openqa.selenium.By selector) -
checkRegion
public void checkRegion(org.openqa.selenium.By selector, boolean stitchContent) -
checkRegion
-
checkRegion
-
checkRegion
-
checkRegion
public void checkRegion(org.openqa.selenium.By selector, int matchTimeout, String tag, boolean stitchContent) -
locate
-
extractTextRegions
-
extractText
-
close
public com.applitools.eyes.TestResults close()- Returns:
- The test results.
-
close
public com.applitools.eyes.TestResults close(boolean shouldThrowException) Close test results.- Parameters:
shouldThrowException- the should throw exception- Returns:
- the test results
-
closeAsync
public void closeAsync()- Specified by:
closeAsyncin interfacecom.applitools.eyes.IEyesBase
-
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
-
getResults
- Specified by:
getResultsin interfacecom.applitools.eyes.IEyesBase
-
getResults
- Specified by:
getResultsin interfacecom.applitools.eyes.IEyesBase
-
abortAsync
public void abortAsync()- Specified by:
abortAsyncin interfacecom.applitools.eyes.IEyesBase
-
getConfigurationInstance
Deprecated. -
setScaleRatio
Manually set the scale ratio for the images being validated.- Parameters:
scaleRatio- The scale ratio to use, ornullto reset back to automatic scaling.
-
getScaleRatio
Gets scale ratio.- Returns:
- The ratio used to scale the images being validated.
-