public class Eyes extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CHARSET_NAME |
protected com.applitools.eyes.EyesScreenshot |
lastScreenshot |
protected com.applitools.eyes.Logger |
logger |
protected com.applitools.eyes.RunningSession |
runningSession |
protected com.applitools.eyes.ServerConnector |
serverConnector |
protected com.applitools.eyes.SessionStartInfo |
sessionStartInfo |
protected static int |
USE_DEFAULT_TIMEOUT |
protected com.applitools.eyes.RectangleSize |
viewportSize |
| Constructor and Description |
|---|
Eyes() |
Eyes(URI serverUrl)
Creates a new (possibly disabled) Eyes instance that interacts with the
Eyes Server at the specified url.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortIfNotClosed() |
protected void |
addMouseTrigger(com.applitools.eyes.MouseAction action,
com.applitools.eyes.Region control,
com.applitools.eyes.Location cursor)
Adds a mouse trigger.
|
protected void |
addMouseTrigger(com.applitools.eyes.MouseAction action,
org.openqa.selenium.WebElement element)
Adds a mouse trigger.
|
protected void |
addMouseTriggerBase(com.applitools.eyes.MouseAction arg0,
com.applitools.eyes.Region arg1,
com.applitools.eyes.Location arg2) |
protected void |
addTextTrigger(com.applitools.eyes.Region control,
String text)
Adds a keyboard trigger.
|
protected void |
addTextTrigger(org.openqa.selenium.WebElement element,
String text)
Adds a keyboard trigger.
|
protected void |
addTextTriggerBase(com.applitools.eyes.Region arg0,
String arg1) |
protected void |
addUserInput(com.applitools.eyes.Trigger arg0) |
protected void |
checkCurrentFrame(int matchTimeout,
String tag)
Checks the current frame
|
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) |
void |
checkRegion(org.openqa.selenium.By selector) |
void |
checkRegion(org.openqa.selenium.By selector,
int matchTimeout,
String tag) |
void |
checkRegion(org.openqa.selenium.By selector,
String tag) |
void |
checkRegion(com.applitools.eyes.Region region) |
void |
checkRegion(com.applitools.eyes.Region region,
int matchTimeout,
String tag) |
void |
checkRegion(org.openqa.selenium.WebElement element) |
void |
checkRegion(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag) |
void |
checkRegion(org.openqa.selenium.WebElement element,
String tag) |
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector) |
void |
checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
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(String[] framePath,
org.openqa.selenium.By selector) |
void |
checkRegionInFrame(String[] framePath,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
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,
int matchTimeout,
String tag)
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(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector) |
void |
checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
int matchTimeout,
String tag)
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 |
checkWindow() |
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) |
protected com.applitools.eyes.MatchResult |
checkWindowBase(com.applitools.eyes.RegionProvider arg0,
String arg1,
boolean arg2) |
protected com.applitools.eyes.MatchResult |
checkWindowBase(com.applitools.eyes.RegionProvider arg0,
String arg1,
boolean arg2,
int arg3) |
protected void |
clearUserInputs() |
com.applitools.eyes.TestResults |
close() |
com.applitools.eyes.TestResults |
close(boolean arg0) |
String |
getAgentId() |
String |
getApiKey() |
String |
getBaseAgentId() |
String |
getBaselineName() |
com.applitools.eyes.BatchInfo |
getBatch() |
String |
getBranchName() |
static URI |
getDefaultServerUrl() |
protected com.applitools.eyes.AppEnvironment |
getEnvironment()
This override also checks for mobile operating system.
|
com.applitools.eyes.FailureReports |
getFailureReports() |
boolean |
getForceFullPageScreenshot() |
protected String |
getFullAgentId() |
boolean |
getHideScrollbars() |
String |
getHostApp() |
String |
getHostOS() |
protected String |
getInferredEnvironment() |
boolean |
getIsDisabled() |
boolean |
getIsOpen() |
com.applitools.eyes.LogHandler |
getLogHandler() |
com.applitools.eyes.MatchLevel |
getMatchLevel() |
int |
getMatchTimeout() |
String |
getParentBranchName() |
com.applitools.eyes.ProxySettings |
getProxy() |
boolean |
getSaveFailedTests() |
boolean |
getSaveNewTests() |
protected com.applitools.eyes.EyesScreenshot |
getScreenshot() |
URI |
getServerUrl() |
protected String |
getTitle() |
protected com.applitools.eyes.Trigger[] |
getUserInputs() |
protected com.applitools.eyes.RectangleSize |
getViewportSize() |
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,
com.applitools.eyes.RectangleSize viewportSize)
Starts a test.
|
void |
openBase(String arg0,
String arg1,
com.applitools.eyes.RectangleSize arg2) |
void |
setAgentId(String arg0) |
void |
setApiKey(String arg0) |
void |
setAppEnvironment(String arg0,
String arg1)
Deprecated.
|
void |
setBaselineName(String arg0) |
void |
setBatch(com.applitools.eyes.BatchInfo arg0) |
void |
setBranchName(String arg0) |
void |
setFailureReports(com.applitools.eyes.FailureReports arg0) |
void |
setForceFullPageScreenshot(boolean shouldForce) |
void |
setHideScrollbars(boolean shouldHide) |
void |
setHostApp(String arg0) |
void |
setHostOS(String arg0) |
void |
setIsDisabled(boolean arg0) |
void |
setLogHandler(com.applitools.eyes.LogHandler arg0) |
void |
setMatchLevel(com.applitools.eyes.MatchLevel arg0) |
void |
setMatchTimeout(int arg0) |
void |
setParentBranchName(String arg0) |
void |
setProxy(com.applitools.eyes.ProxySettings arg0) |
void |
setSaveFailedTests(boolean arg0) |
void |
setSaveNewTests(boolean arg0) |
void |
setServerUrl(URI arg0) |
protected void |
setViewportSize(com.applitools.eyes.RectangleSize size) |
protected void |
startSession() |
protected static final int USE_DEFAULT_TIMEOUT
public static final String DEFAULT_CHARSET_NAME
protected com.applitools.eyes.ServerConnector serverConnector
protected com.applitools.eyes.RunningSession runningSession
protected com.applitools.eyes.SessionStartInfo sessionStartInfo
protected com.applitools.eyes.RectangleSize viewportSize
protected com.applitools.eyes.EyesScreenshot lastScreenshot
protected com.applitools.eyes.Logger logger
public Eyes(URI serverUrl)
serverUrl - The Eyes server URL.public Eyes()
public String getBaseAgentId()
public void setForceFullPageScreenshot(boolean shouldForce)
public boolean getForceFullPageScreenshot()
public void setHideScrollbars(boolean shouldHide)
public boolean getHideScrollbars()
public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize)
driver - The web driver that controls the browser hosting the
application under test.appName - The name of the application under test.testName - The test name.viewportSize - The required browser's viewport size
(i.e., the visible part of the document's body) or
null to allow any viewport size.public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName)
public void checkWindow()
public void checkWindow(String tag)
tag - An optional tag to be associated with the snapshot.. Default match timeout is used.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 checkRegion(com.applitools.eyes.Region region)
public void checkRegion(com.applitools.eyes.Region region,
int matchTimeout,
String tag)
public void checkRegion(org.openqa.selenium.WebElement element)
public void checkRegion(org.openqa.selenium.WebElement element,
String tag)
public void checkRegion(org.openqa.selenium.WebElement element,
int matchTimeout,
String tag)
public void checkRegion(org.openqa.selenium.By selector)
public void checkRegion(org.openqa.selenium.By selector,
String tag)
public void checkRegion(org.openqa.selenium.By selector,
int matchTimeout,
String tag)
public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector)
public void checkRegionInFrame(int frameIndex,
org.openqa.selenium.By selector,
String tag)
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 - 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.public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector)
public void checkRegionInFrame(String frameNameOrId, org.openqa.selenium.By selector, String tag)
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.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)
public void checkRegionInFrame(org.openqa.selenium.WebElement frameReference,
org.openqa.selenium.By selector,
String tag)
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.matchTimeout - The amount of time to retry matching.
(Milliseconds)tag - An optional tag to be associated with the snapshot.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, 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)
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)
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)
public void checkRegionInFrame(String[] framePath, org.openqa.selenium.By selector, 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).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.public void checkRegionInFrame(String[] framePath, org.openqa.selenium.By selector, String tag)
public void checkRegionInFrame(String[] framePath, org.openqa.selenium.By selector)
protected void addMouseTrigger(com.applitools.eyes.MouseAction action,
com.applitools.eyes.Region control,
com.applitools.eyes.Location cursor)
action - Mouse action.control - The control on which the trigger is activated (context
relative coordinates).cursor - The cursor's position relative to the control.protected void addMouseTrigger(com.applitools.eyes.MouseAction action,
org.openqa.selenium.WebElement element)
action - Mouse action.element - The WebElement on which the click was called.protected void addTextTrigger(com.applitools.eyes.Region control,
String text)
control - The control's context-relative region.text - The trigger's text.protected void addTextTrigger(org.openqa.selenium.WebElement element,
String text)
element - The element for which we sent keys.text - The trigger's text.protected com.applitools.eyes.RectangleSize getViewportSize()
protected void setViewportSize(com.applitools.eyes.RectangleSize size)
protected com.applitools.eyes.EyesScreenshot getScreenshot()
protected String getTitle()
protected String getInferredEnvironment()
protected com.applitools.eyes.AppEnvironment getEnvironment()
public void setAgentId(String arg0)
public String getAgentId()
public void setApiKey(String arg0)
public String getApiKey()
public void setServerUrl(URI arg0)
public URI getServerUrl()
public void setProxy(com.applitools.eyes.ProxySettings arg0)
public com.applitools.eyes.ProxySettings getProxy()
public void setIsDisabled(boolean arg0)
public boolean getIsDisabled()
public void setBranchName(String arg0)
public String getBranchName()
public void setParentBranchName(String arg0)
public String getParentBranchName()
protected void clearUserInputs()
protected com.applitools.eyes.Trigger[] getUserInputs()
public void setMatchTimeout(int arg0)
public int getMatchTimeout()
public void setSaveNewTests(boolean arg0)
public boolean getSaveNewTests()
public void setSaveFailedTests(boolean arg0)
public boolean getSaveFailedTests()
public void setBatch(com.applitools.eyes.BatchInfo arg0)
public com.applitools.eyes.BatchInfo getBatch()
public void setFailureReports(com.applitools.eyes.FailureReports arg0)
public com.applitools.eyes.FailureReports getFailureReports()
public void setMatchLevel(com.applitools.eyes.MatchLevel arg0)
public com.applitools.eyes.MatchLevel getMatchLevel()
protected String getFullAgentId()
public boolean getIsOpen()
public static URI getDefaultServerUrl()
public void setLogHandler(com.applitools.eyes.LogHandler arg0)
public com.applitools.eyes.LogHandler getLogHandler()
public com.applitools.eyes.TestResults close()
public com.applitools.eyes.TestResults close(boolean arg0)
public void abortIfNotClosed()
public void setHostOS(String arg0)
public String getHostOS()
public void setHostApp(String arg0)
public String getHostApp()
public void setBaselineName(String arg0)
public String getBaselineName()
@Deprecated public void setAppEnvironment(String arg0, String arg1)
protected com.applitools.eyes.MatchResult checkWindowBase(com.applitools.eyes.RegionProvider arg0,
String arg1,
boolean arg2)
protected com.applitools.eyes.MatchResult checkWindowBase(com.applitools.eyes.RegionProvider arg0,
String arg1,
boolean arg2,
int arg3)
protected void addUserInput(com.applitools.eyes.Trigger arg0)
protected void addTextTriggerBase(com.applitools.eyes.Region arg0,
String arg1)
protected void addMouseTriggerBase(com.applitools.eyes.MouseAction arg0,
com.applitools.eyes.Region arg1,
com.applitools.eyes.Location arg2)
protected void startSession()
Copyright © 2015. All rights reserved.