| Modifier and Type | Class and Description |
|---|---|
static interface |
Eyes.WebDriverAction |
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_DEVICE_PIXEL_RATIO |
static double |
UNKNOWN_DEVICE_PIXEL_RATIO |
config, cutProviderHandler, debugScreenshotsProvider, domCaptureListener, lastScreenshot, logger, positionProviderHandler, renderInfo, runningSession, scaleProviderHandler, serverConnector, sessionStartInfo, USE_DEFAULT_TIMEOUT, viewportSizeHandler| Constructor and Description |
|---|
Eyes()
Creates a new Eyes instance that interacts with the Eyes cloud
service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMouseTrigger(MouseAction action,
Region control,
Location cursor)
Adds a mouse trigger.
|
void |
addMouseTrigger(MouseAction action,
org.openqa.selenium.WebElement element)
Adds a mouse trigger.
|
void |
addTextTrigger(Region control,
String text)
Adds a keyboard trigger.
|
void |
addTextTrigger(org.openqa.selenium.WebElement element,
String text)
Adds a keyboard trigger.
|
protected void |
beforeOpen() |
void |
check(ICheckSettings... checkSettings)
Takes multiple screenshots at once (given all
ICheckSettings objects are on the same level). |
void |
check(ICheckSettings checkSettings) |
void |
check(String name,
ICheckSettings checkSettings) |
protected void |
checkCurrentFrame(int matchTimeout,
String tag)
Verifies the current frame.
|
void |
checkElement(org.openqa.selenium.By selector)
|
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)
|
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)
|
void |
checkFrame(int frameIndex)
|
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)
|
void |
checkFrame(String frameNameOrId)
|
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)
|
void |
checkFrame(org.openqa.selenium.WebElement frameReference)
|
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)
|
protected MatchResult |
checkFrameFluent(String name,
ICheckSettings checkSettings) |
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(Region region)
|
void |
checkRegion(Region region,
int matchTimeout,
String tag)
Takes a snapshot of the application under test and matches a specific region within it with the expected output.
|
void |
checkRegion(org.openqa.selenium.WebElement element)
|
void |
checkRegion(org.openqa.selenium.WebElement element,
boolean stitchContent)
If
stitchContent is false then behaves the same as
checkRegion(WebElement), otherwise
behaves the same as checkElement(WebElement). |
void |
checkRegion(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag)
Takes a snapshot of the application under test and matches a region of
a specific element with the expected region output.
|
void |
checkRegion(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag,
boolean stitchContent)
|
void |
checkRegion(org.openqa.selenium.WebElement element,
String tag)
|
void |
checkRegion(org.openqa.selenium.WebElement element,
String tag,
boolean stitchContent)
|
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector)
|
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
boolean stitchContent)
|
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
|
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
Switches into the given frame, takes a snapshot of the application under
test and matches a region specified by the given selector.
|
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
String tag)
|
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
|
void |
checkRegionInFrame(String[] framePath,
org.openqa.selenium.By selector)
|
void |
checkRegionInFrame(String[] framePath,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
|
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[] framePath,
org.openqa.selenium.By selector,
String tag)
|
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,
String tag)
|
void |
checkRegionInFrame(String frameNameOrId,
org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
Switches into the given frame, takes a snapshot of the application under
test and matches a region specified by the given selector.
|
void |
checkRegionInFrame(String frameNameOrId,
org.openqa.selenium.By selector,
String tag)
|
void |
checkRegionInFrame(String frameNameOrId,
org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
|
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector)
|
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
boolean stitchContent)
|
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
|
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
Switches into the given frame, takes a snapshot of the application under
test and matches a region specified by the given selector.
|
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
String tag)
|
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
|
void |
checkWindow()
See
checkWindow(String). |
void |
checkWindow(int matchTimeout,
String tag)
Takes a snapshot of the application under test and matches it with
the expected output.
|
void |
checkWindow(String tag)
|
TestResults |
close(boolean throwEx) |
protected void |
ensureConfiguration() |
Object |
getAgentSetup() |
protected AppEnvironment |
getAppEnvironment() |
protected String |
getAUTSessionId() |
String |
getBaseAgentId() |
PositionProvider |
getCurrentFramePositionProvider() |
org.openqa.selenium.WebElement |
getCurrentFrameScrollRootElement() |
double |
getDevicePixelRatio() |
org.openqa.selenium.WebDriver |
getDriver() |
boolean |
getForceFullPageScreenshot() |
boolean |
getHideCaret() |
boolean |
getHideScrollbars() |
protected String |
getInferredEnvironment() |
FrameChain |
getOriginalFC() |
Region |
getRegionToCheck() |
ImageRotation |
getRotation() |
protected EyesScreenshot |
getScreenshot() |
org.openqa.selenium.WebElement |
getScrollRootElement() |
boolean |
getScrollToRegion() |
IServerConnector |
getServerConnector() |
StitchMode |
getStitchMode() |
protected EyesScreenshot |
getSubScreenshot(EyesScreenshot screenshot,
Region region,
ICheckSettingsInternal checkSettingsInternal) |
protected String |
getTitle() |
RectangleSize |
getViewportSize()
Use this method only if you made a previous call to
(WebDriver, String, String) or one of its variants. |
static RectangleSize |
getViewportSize(org.openqa.selenium.WebDriver driver)
Call this method if for some
reason you don't want to call
open(WebDriver, String, String)
(or one of its variants) yet. |
int |
getWaitBeforeScreenshots() |
boolean |
isSendDom() |
protected org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver) |
org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver,
Configuration configuration) |
org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver,
String appName,
String testName)
|
org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
RectangleSize viewportSize)
|
protected org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
RectangleSize viewportSize,
SessionType sessionType)
Starts a test.
|
protected org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
SessionType sessionType)
|
void |
setForceFullPageScreenshot(boolean shouldForce)
Forces a full page screenshot (by scrolling and stitching) if the
browser only supports viewport screenshots).
|
void |
setHideCaret(boolean hideCaret) |
void |
setHideScrollbars(boolean shouldHide)
Hide the scrollbars when taking screenshots.
|
void |
setIsDisabled(boolean disabled) |
void |
setRegionToCheck(Region regionToCheck) |
void |
setRotation(ImageRotation rotation) |
void |
setScrollToRegion(boolean shouldScroll)
Turns on/off the automatic scrolling to a region being checked by
checkRegion. |
void |
setStitchMode(StitchMode mode)
Set the type of stitching used for full page screenshots.
|
protected void |
setViewportSize(RectangleSize size)
Use this method only if you made a previous call to
(WebDriver, String, String) or one of its variants. |
static void |
setViewportSize(org.openqa.selenium.WebDriver driver,
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() |
void |
testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName)
|
void |
testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
Eyes.WebDriverAction action)
|
void |
testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
Eyes.WebDriverAction action,
int deadline)
|
void |
testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
Eyes.WebDriverAction action,
int deadline,
int timeout)
Run a visual performance test.
|
void |
testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
Eyes.WebDriverAction action,
int deadline,
int timeout,
RectangleSize viewportSize)
Similar to
testResponseTime(WebDriver, String, String, WebDriverAction, int, int),
except this method sets the viewport size before starting the
performance test. |
void |
testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
Eyes.WebDriverAction action,
int deadline,
RectangleSize viewportSize)
|
void |
testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
Eyes.WebDriverAction action,
RectangleSize viewportSize)
|
void |
testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
int deadline)
|
void |
testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
int deadline,
int timeout,
RectangleSize viewportSize)
|
void |
testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
int deadline,
RectangleSize viewportSize)
|
void |
testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
RectangleSize viewportSize)
|
void |
testWindow(org.openqa.selenium.WebDriver driver,
String testName)
|
void |
testWindow(org.openqa.selenium.WebDriver driver,
String testName,
RectangleSize viewportSize)
|
void |
testWindow(org.openqa.selenium.WebDriver driver,
String appName,
String testName)
|
void |
testWindow(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
RectangleSize viewportSize)
Runs a test on the current window.
|
String |
tryCaptureDom() |
protected ScaleProviderFactory |
updateScalingParams()
Updates the state of scaling related parameters.
|
abortIfNotClosed, addMouseTriggerBase, addProperty, addSessionEventHandler, addTextTriggerBase, addUserInput, afterMatchWindow, afterOpen, beforeMatchWindow, checkWindowBase, checkWindowBase, checkWindowBase, clearProperties, clearSessionEventHandlers, clearUserInputs, close, closeLogger, closeResponseTime, ensureRunningSession, fireValidationWillStartEvent, getAgentId, getApiKey, getAppName, getBaselineBranchName, getBaselineEnvName, getBaselineName, getBatch, getBranchName, getDebugScreenshotsPath, getDebugScreenshotsPrefix, getDebugScreenshotsProvider, getDefaultMatchSettings, getDefaultServerUrl, getEnvName, getFailureReports, getFullAgentId, getHostApp, getHostOS, getIgnoreCaret, getIsCutProviderExplicitlySet, getIsDisabled, getIsOpen, getLogger, getLogHandler, getMatchLevel, getMatchTimeout, getParentBranchName, getPositionProvider, getProxy, getRenderingInfo, getSaveDebugScreenshots, getSaveDiffs, getSaveFailedTests, getSaveNewTests, getScaleRatio, getServerUrl, getSessionEventHandlers, getStitchOverlap, getUserInputs, log, openBase, openBase, openLogger, removeSessionEventHandler, setAgentId, setApiKey, setAppEnvironment, setAppName, setBaselineBranchName, setBaselineEnvName, setBaselineName, setBatch, setBranchName, setDebugScreenshotsPath, setDebugScreenshotsPrefix, setDefaultMatchSettings, setEnvName, setExplicitViewportSize, setFailureReports, setHostApp, setHostOS, setIgnoreCaret, setImageCut, setLogHandler, setMatchLevel, setMatchTimeout, setOnDomCapture, setParentBranchName, setPositionProvider, setProxy, setSaveDebugScreenshots, setSaveDiffs, setSaveFailedTests, setSaveNewTests, setScaleRatio, setSendDom, setServerConnector, setServerUrl, setServerUrl, setStitchOverlap, startSession, testResponseTimeBaseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitabortIfNotClosed, getApiKey, getIsDisabled, getIsOpen, getLogger, getServerUrl, setApiKey, setBranchName, setLogHandler, setMatchLevel, setParentBranchName, setProxy, setServerUrlpublic static final double UNKNOWN_DEVICE_PIXEL_RATIO
public static final double DEFAULT_DEVICE_PIXEL_RATIO
public Eyes()
public String getBaseAgentId()
getBaseAgentId in class EyesBasepublic org.openqa.selenium.WebDriver getDriver()
public FrameChain getOriginalFC()
public PositionProvider getCurrentFramePositionProvider()
public Region getRegionToCheck()
public void setRegionToCheck(Region regionToCheck)
protected void ensureConfiguration()
ensureConfiguration in class EyesBasepublic boolean getHideCaret()
public void setHideCaret(boolean hideCaret)
setHideCaret in interface IEyespublic boolean shouldStitchContent()
public void setForceFullPageScreenshot(boolean shouldForce)
shouldForce - Whether to force a full page screenshot or not.public boolean getForceFullPageScreenshot()
public void setWaitBeforeScreenshots(int waitBeforeScreenshots)
waitBeforeScreenshots - The time to wait (Milliseconds). Values
smaller or equal to 0, will cause the
default value to be used.public int getWaitBeforeScreenshots()
public void setScrollToRegion(boolean shouldScroll)
checkRegion.shouldScroll - Whether to automatically scroll to a region being validated.public boolean getScrollToRegion()
public void setStitchMode(StitchMode mode)
StitchMode.CSS.
Default is StitchMode.SCROLL.mode - The stitch mode to set.public StitchMode getStitchMode()
public void setHideScrollbars(boolean shouldHide)
shouldHide - Whether to hide the scrollbars or not.public boolean getHideScrollbars()
public ImageRotation getRotation()
public void setRotation(ImageRotation rotation)
rotation - The image rotation model.public double getDevicePixelRatio()
UNKNOWN_DEVICE_PIXEL_RATIO
if the DPR is not known yet or if it wasn't possible to extract it.public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
Configuration configuration)
public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
RectangleSize viewportSize)
public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName)
open(WebDriver, String, String, SessionType).
viewportSize defaults to null.
sessionType defaults to null.protected org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
RectangleSize viewportSize,
SessionType sessionType)
driver - The web driver that controls the browser hosting
the application under test.appName - The name of the application under test.testName - The test name.viewportSize - The required browser's viewport size
(i.e., the visible part of the document's body) or
null to use the current window's viewport.sessionType - The type of test (e.g., standard test / visual
performance test).protected org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver)
throws EyesException
EyesExceptionpublic org.openqa.selenium.WebElement getScrollRootElement()
protected org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
SessionType sessionType)
public void checkWindow()
public void checkWindow(String tag)
checkWindow(int, String).
Default match timeout is used.tag - An optional tag to be associated with the snapshot.public void checkWindow(int matchTimeout,
String tag)
matchTimeout - The amount of time to retry matching (Milliseconds).tag - An optional tag to be associated with the snapshot.TestFailedException - Thrown if a mismatch is detected and
immediate failure reports are enabled.public void testWindow(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
RectangleSize viewportSize)
driver - The web driver that controls the browser hosting
the application under test.appName - The name of the application under test.testName - The test name (will also be used as the tag name for the step).viewportSize - The required browser's viewport size
(i.e., the visible part of the document's body) or
null to use the current window's viewport.public void testWindow(org.openqa.selenium.WebDriver driver,
String appName,
String testName)
public void testWindow(org.openqa.selenium.WebDriver driver,
String testName,
RectangleSize viewportSize)
testWindow(WebDriver, String, String, RectangleSize).
appName defaults to null (which means the name set in
EyesBase.setAppName(String) would be used.public void testWindow(org.openqa.selenium.WebDriver driver,
String testName)
public void testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
Eyes.WebDriverAction action,
int deadline,
int timeout)
driver - The driver to use.appName - The name of the application being tested.testName - The test name.action - Actions to be performed in parallel to starting the test.deadline - The expected time until the application should have been loaded. (Seconds)timeout - The maximum time until the application should have been loaded. (Seconds)public void testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
Eyes.WebDriverAction action,
int deadline)
testResponseTime(WebDriver, String, String, WebDriverAction, int, int).
timeout defaults to deadline + RESPONSE_TIME_DEFAULT_DIFF_FROM_DEADLINE.public void testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
Eyes.WebDriverAction action)
testResponseTime(WebDriver, String, String, WebDriverAction, int, int).
deadline defaults to RESPONSE_TIME_DEFAULT_DEADLINE.
timeout defaults to RESPONSE_TIME_DEFAULT_DEADLINE + RESPONSE_TIME_DEFAULT_DIFF_FROM_DEADLINE.public void testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
int deadline)
testResponseTime(WebDriver, String, String, WebDriverAction, int, int).
action defaults to null.
timeout defaults to deadline + RESPONSE_TIME_DEFAULT_DIFF_FROM_DEADLINE.public void testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName)
testResponseTime(WebDriver, String, String, WebDriverAction, int, int).
deadline defaults to RESPONSE_TIME_DEFAULT_DEADLINE.
timeout defaults to RESPONSE_TIME_DEFAULT_DEADLINE + RESPONSE_TIME_DEFAULT_DIFF_FROM_DEADLINE.
action defaults to null.public void testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
Eyes.WebDriverAction action,
int deadline,
int timeout,
RectangleSize viewportSize)
testResponseTime(WebDriver, String, String, WebDriverAction, int, int),
except this method sets the viewport size before starting the
performance test.viewportSize - The required viewport size.public void testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
Eyes.WebDriverAction action,
int deadline,
RectangleSize viewportSize)
testResponseTime(WebDriver, String, String, WebDriverAction, int, int, RectangleSize).
timeout defaults to deadline + RESPONSE_TIME_DEFAULT_DIFF_FROM_DEADLINE.public void testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
Eyes.WebDriverAction action,
RectangleSize viewportSize)
testResponseTime(WebDriver, String, String, WebDriverAction, int, int, RectangleSize).
deadline defaults to RESPONSE_TIME_DEFAULT_DEADLINE.
timeout defaults to RESPONSE_TIME_DEFAULT_DEADLINE + RESPONSE_TIME_DEFAULT_DIFF_FROM_DEADLINE.public void testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
int deadline,
int timeout,
RectangleSize viewportSize)
testResponseTime(WebDriver, String, String, WebDriverAction, int, int, RectangleSize).
action defaults to null.public void testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
int deadline,
RectangleSize viewportSize)
testResponseTime(WebDriver, String, String, int, int, RectangleSize).
timeout defaults to deadline + RESPONSE_TIME_DEFAULT_DIFF_FROM_DEADLINE.public void testResponseTime(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
RectangleSize viewportSize)
testResponseTime(WebDriver, String, String, int, int, RectangleSize).
deadline defaults to RESPONSE_TIME_DEFAULT_DEADLINE.
timeout defaults to RESPONSE_TIME_DEFAULT_DEADLINE + RESPONSE_TIME_DEFAULT_DIFF_FROM_DEADLINE.public void check(ICheckSettings... checkSettings)
ICheckSettings objects are on the same level).checkSettings - Multiple ICheckSettings object representing different regions in the viewport.public void check(String name, ICheckSettings checkSettings)
public void setIsDisabled(boolean disabled)
setIsDisabled in interface IEyessetIsDisabled in class EyesBasepublic String tryCaptureDom()
tryCaptureDom in class EyesBasepublic void check(ICheckSettings checkSettings)
protected MatchResult checkFrameFluent(String name, ICheckSettings checkSettings)
public void checkRegion(Region region)
public void checkRegion(Region region, int matchTimeout, String tag)
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.TestFailedException - Thrown if a mismatch is detected and immediate failure reports are enabled.public void checkRegion(org.openqa.selenium.WebElement element)
element - The element which represents the region to check.public void checkRegion(org.openqa.selenium.WebElement element,
boolean stitchContent)
stitchContent is false then behaves the same as
checkRegion(WebElement), otherwise
behaves the same as checkElement(WebElement).element - The element which represents the region to check.stitchContent - Whether to take a screenshot of the whole region and stitch if needed.public void checkRegion(org.openqa.selenium.WebElement element,
String tag)
checkRegion(WebElement, int, String).
Default match timeout is used.element - The element which represents the region to check.tag - An optional tag to be associated with the snapshot.public void checkRegion(org.openqa.selenium.WebElement element,
String tag,
boolean stitchContent)
stitchContent is false then behaves the same checkRegion(WebElement, String). Otherwise
behaves the same as checkElement(WebElement, String).element - The element which represents the region to check.tag - An optional tag to be associated with the snapshot.stitchContent - Whether to take a screenshot of the whole region and stitch if needed.public void checkRegion(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag)
element - The element which represents the region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.TestFailedException - if a mismatch is detected and
immediate failure reports are enabledpublic void checkRegion(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag,
boolean stitchContent)
stitchContent is false then behaves the same checkRegion(WebElement, int, String). Otherwise
behaves the same as checkElement(WebElement, String).element - The element which represents the region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.stitchContent - Whether to take a screenshot of the whole region and stitch if needed.public void checkRegion(org.openqa.selenium.By selector)
selector - The selector by which to specify which region to check.public void checkRegion(org.openqa.selenium.By selector,
boolean stitchContent)
stitchContent is false then behaves the same as
checkRegion(By). Otherwise, behaves the
same as #checkElement(org.openqa.selenium.By)selector - The selector by which to specify which region to check.stitchContent - Whether to take a screenshot of the whole region and stitch if needed.public void checkRegion(org.openqa.selenium.By selector,
String tag)
checkRegion(By, int, String).
Default match timeout is used.selector - The selector by which to specify which region to check.tag - An optional tag to be associated with the screenshot.public void checkRegion(org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
stitchContent is false then behaves the same as
checkRegion(By, String). Otherwise,
behaves the same as checkElement(By, String).selector - The selector by which to specify which region to check.tag - An optional tag to be associated with the screenshot.stitchContent - Whether to take a screenshot of the whole region and stitch if needed.public void checkRegion(org.openqa.selenium.By selector,
int matchTimeout,
String tag)
selector - The selector by which to specify which region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the screenshot.TestFailedException - if a mismatch is detected and
immediate failure reports are enabledpublic void checkRegion(org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
stitchContent is false then behaves the same as
checkRegion(By, int, String). Otherwise,
behaves the same as checkElement(By, int, String).selector - The selector by which to specify which region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the screenshot.stitchContent - Whether to take a screenshot of the whole region and stitch if needed.public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector)
frameIndex - The index of the frame to switch to. (The same index
as would be used in a call to
driver.switchTo().frame()).selector - The selector by which to specify which region to check inside the frame.public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
boolean stitchContent)
frameIndex - The index of the frame to switch to. (The same index
as would be used in a call to
driver.switchTo().frame()).selector - The selector by which to specify which region to check inside the frame.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
String tag)
frameIndex - The index of the frame to switch to. (The same index
as would be used in a call to
driver.switchTo().frame()).selector - The selector by which to specify which region to check inside the frame.tag - An optional tag to be associated with the screenshot.public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
checkRegionInFrame(int, By, int, String, boolean).
Default match timeout is used.frameIndex - The index of the frame to switch to. (The same index
as would be used in a call to
driver.switchTo().frame()).selector - The selector by which to specify which region to check inside the frame.tag - An optional tag to be associated with the screenshot.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
frameIndex - The index of the frame to switch to. (The same index
as would be used in a call to
driver.switchTo().frame()).selector - The selector by which to specify which region to check inside the frame.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the screenshot.public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
frameIndex - The index of the frame to switch to. (The same index
as would be used in a call to
driver.switchTo().frame()).selector - A Selector specifying the region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector)
frameNameOrId - The name or id of the frame to switch to. (as would
be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, boolean stitchContent)
frameNameOrId - The name or id of the frame to switch to. (as would
be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, String tag)
frameNameOrId - The name or id of the frame to switch to. (as would
be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check.tag - An optional tag to be associated with the snapshot.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, String tag, boolean stitchContent)
checkRegionInFrame(String, By, int, String, boolean).
Default match timeout is usedframeNameOrId - The name or id of the frame to switch to. (as would
be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check.tag - An optional tag to be associated with the snapshot.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, int matchTimeout, String tag)
frameNameOrId - The name or id of the frame to switch to. (as would
be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, int matchTimeout, String tag, boolean stitchContent)
frameNameOrId - The name or id of the frame to switch to. (as would
be used in a call to driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the region.public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector)
frameReference - The element which is the frame to switch to. (as
would be used in a call to
driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
boolean stitchContent)
frameReference - The element which is the frame to switch to. (as
would be used in a call to
driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
String tag)
frameReference - The element which is the frame to switch to. (as
would be used in a call to
driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.tag - An optional tag to be associated with the snapshot.public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
String tag,
boolean stitchContent)
checkRegionInFrame(WebElement, By, int, String, boolean).
Default match timeout is used.frameReference - The element which is the frame to switch to. (as
would be used in a call to
driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.tag - An optional tag to be associated with the snapshot.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
frameReference - The element which is the frame to switch to. (as
would be used in a call to
driver.switchTo().frame()).selector - A Selector specifying the region to check inside the frame.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
int matchTimeout,
String tag,
boolean stitchContent)
frameReference - The element which is the frame to switch to. (as
would be used in a call to
driver.switchTo().frame()).selector - A Selector specifying the region to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.stitchContent - If true, stitch the internal content of
the region (i.e., perform
checkElement(By, int, String) on the
region.protected ScaleProviderFactory updateScalingParams()
public org.openqa.selenium.WebElement getCurrentFrameScrollRootElement()
protected void checkCurrentFrame(int matchTimeout,
String tag)
matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.public void checkFrame(String frameNameOrId)
public void checkFrame(String frameNameOrId, String tag)
checkFrame(String, int, String).
Default match timeout is used.public void checkFrame(String frameNameOrId, int matchTimeout, String tag)
frameNameOrId - The name or id of the frame to check. (The same
name/id as would be used in a call to
driver.switchTo().frame()).matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the match.public void checkFrame(int frameIndex)
public void checkFrame(int frameIndex,
String tag)
checkFrame(int, int, String).
Default match timeout is used.public void checkFrame(int frameIndex,
int matchTimeout,
String tag)
frameIndex - The index of the frame to switch to. (The same index
as would be used in a call to
driver.switchTo().frame()).matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the match.public void checkFrame(org.openqa.selenium.WebElement frameReference)
public void checkFrame(org.openqa.selenium.WebElement frameReference,
String tag)
checkFrame(WebElement, int, String).
Default match timeout is used.public void checkFrame(org.openqa.selenium.WebElement frameReference,
int matchTimeout,
String tag)
frameReference - The element which is the frame to switch to. (as
would be used in a call to
driver.switchTo().frame() ).matchTimeout - The amount of time to retry matching (milliseconds).tag - An optional tag to be associated with the match.public void checkFrame(String[] framePath, int matchTimeout, String tag)
framePath - The path to the frame to check. This is a list of
frame names/IDs (where each frame is nested in the
previous frame).matchTimeout - The amount of time to retry matching (milliseconds).tag - An optional tag to be associated with the match.public void checkFrame(String[] framesPath, String tag)
checkFrame(String[], int, String).
Default match timeout is used.public void checkFrame(String[] framesPath)
public void checkRegionInFrame(String[] framePath, org.openqa.selenium.By selector, int matchTimeout, String tag, boolean stitchContent)
framePath - The path to the frame to check. This is a list of
frame names/IDs (where each frame is nested in the previous frame).selector - A Selector specifying the region to check.matchTimeout - The amount of time to retry matching (milliseconds).tag - An optional tag to be associated with the snapshot.stitchContent - Whether or not to stitch the internal content of the
region (i.e., perform checkElement(By, int, String) on the region.public void checkRegionInFrame(String[] framePath, org.openqa.selenium.By selector, int matchTimeout, String tag)
public void checkRegionInFrame(String[] framePath, org.openqa.selenium.By selector, String tag)
checkRegionInFrame(String[], By, int, String).
Default match timeout is used.public void checkRegionInFrame(String[] framePath, org.openqa.selenium.By selector)
checkRegionInFrame(String[], By, int, String).
Default match timeout is used.
tag defaults to null.public void checkElement(org.openqa.selenium.WebElement element)
public void checkElement(org.openqa.selenium.WebElement element,
String tag)
checkElement(WebElement, int, String).
Default match timeout is used.public void checkElement(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag)
element - The element to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the snapshot.TestFailedException - if a mismatch is detected and immediate failure reports are enabledpublic void checkElement(org.openqa.selenium.By selector)
public void checkElement(org.openqa.selenium.By selector,
String tag)
checkElement(By, int, String).
Default match timeout is used.public void checkElement(org.openqa.selenium.By selector,
int matchTimeout,
String tag)
selector - Selects the element to check.matchTimeout - The amount of time to retry matching. (Milliseconds)tag - An optional tag to be associated with the screenshot.TestFailedException - if a mismatch is detected and
immediate failure reports are enabledpublic void addMouseTrigger(MouseAction action, Region control, Location cursor)
action - Mouse action.control - The control on which the trigger is activated (context relative coordinates).cursor - The cursor's position relative to the control.public void addMouseTrigger(MouseAction action, org.openqa.selenium.WebElement element)
action - Mouse action.element - The WebElement on which the click was called.public void addTextTrigger(Region control, String text)
control - The control's context-relative region.text - The trigger's text.public void addTextTrigger(org.openqa.selenium.WebElement element,
String text)
element - The element for which we sent keys.text - The trigger's text.public RectangleSize getViewportSize()
(WebDriver, String, String) or one of its variants.
getViewportSize in class EyesBasepublic static RectangleSize getViewportSize(org.openqa.selenium.WebDriver driver)
open(WebDriver, String, String)
(or one of its variants) yet.driver - The driver to use for getting the viewport.protected void setViewportSize(RectangleSize size)
(WebDriver, String, String) or one of its variants.
setViewportSize in class EyesBasepublic static void setViewportSize(org.openqa.selenium.WebDriver driver,
RectangleSize size)
open(WebDriver, String, String)
(or one of its variants) yet.driver - The driver to use for setting the viewport.size - The required viewport size.protected void beforeOpen()
beforeOpen in class EyesBaseprotected EyesScreenshot getSubScreenshot(EyesScreenshot screenshot, Region region, ICheckSettingsInternal checkSettingsInternal)
getSubScreenshot in class EyesBaseprotected EyesScreenshot getScreenshot()
getScreenshot in class EyesBaseprotected String getInferredEnvironment()
getInferredEnvironment in class EyesBaseprotected AppEnvironment getAppEnvironment()
This override also checks for mobile operating system.
getAppEnvironment in class EyesBaseprotected String getAUTSessionId()
getAUTSessionId in class EyesBasepublic TestResults close(boolean throwEx)
public Object getAgentSetup()
getAgentSetup in class EyesBasepublic IServerConnector getServerConnector()
Copyright © 2019. All rights reserved.