public class Eyes extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.applitools.eyes.AgentConnector |
agentConnector |
static String |
DEFAULT_CHARSET_NAME |
protected static com.applitools.eyes.MatchLevel |
DEFAULT_MATCH_LEVEL |
protected com.applitools.eyes.EyesScreenshot |
lastScreenshot |
protected com.applitools.eyes.RunningSession |
runningSession |
protected com.applitools.eyes.SessionStartInfo |
sessionStartInfo |
protected com.applitools.eyes.RectangleSize |
viewportSize |
| Constructor and Description |
|---|
Eyes()
Creates a new Eyes instance that interacts with the Eyes cloud
service.
|
Eyes(URI serverUrl)
Creates a new Eyes instance that interacts with the Eyes Server at the
specified url.
|
Eyes(URI serverUrl,
boolean isDisabled)
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 arg0,
com.applitools.eyes.Region arg1,
com.applitools.eyes.Location arg2) |
protected void |
addTextTrigger(com.applitools.eyes.Region arg0,
String arg1) |
protected void |
addUserInput(com.applitools.eyes.Trigger arg0) |
protected void |
checkRegion(BufferedImage arg0,
com.applitools.eyes.Region arg1,
String arg2,
boolean arg3) |
void |
checkRegion(org.openqa.selenium.By selector,
String tag)
Takes a snapshot of the specified region of the application under test
and matches it with the expected region output.
|
void |
checkWindow()
Takes a snapshot of the application under test and matches it with
the expected output.
|
protected void |
checkWindow(BufferedImage arg0,
String arg1,
boolean arg2) |
protected void |
checkWindow(com.applitools.eyes.Region region,
String tag)
Takes a snapshot of the application under test and matches it with
the expected output.
|
void |
checkWindow(String tag)
Takes a snapshot of the application under test and matches it with
the expected output.
|
protected void |
clearUserInputs() |
com.applitools.eyes.TestResults |
close() |
String |
getAgentId() |
static String |
getApiKey()
Gets the currently set API key or
null if no key is set. |
static URI |
getDefaultServerUrl() |
protected com.applitools.eyes.AppEnvironment |
getEnvironment()
This override also checks for mobile operating system.
|
com.applitools.eyes.FailureReports |
getFailureReports() |
protected String |
getInferredEnvironment() |
boolean |
getIsDisabled() |
boolean |
getIsOpen() |
protected com.applitools.eyes.EyesScreenshot |
getLastScreenshot() |
static com.applitools.eyes.ProxySettings |
getProxy()
Get the current proxy settings.
|
boolean |
getSaveFailedTests() |
boolean |
getSaveNewTests() |
protected String |
getTitle() |
protected com.applitools.eyes.Trigger[] |
getUserInputs() |
protected com.applitools.eyes.RectangleSize |
getViewportSize() |
void |
open(String arg0,
String arg1,
com.applitools.eyes.RectangleSize arg2,
com.applitools.eyes.MatchLevel arg3,
com.applitools.eyes.FailureReports arg4) |
org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver,
String appName,
String testName)
Starts a test for any viewport size that reports failures upon test
completion.
|
org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize)
Starts a test that reports failures upon test completion.
|
org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize,
com.applitools.eyes.FailureReports failureReports)
Starts a test.
|
org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize,
com.applitools.eyes.MatchLevel matchLevel)
Starts a test that reports failures upon test completion.
|
org.openqa.selenium.WebDriver |
open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize,
com.applitools.eyes.MatchLevel matchLevel,
com.applitools.eyes.FailureReports failureReports)
Starts a test.
|
static void |
setApiKey(String apiKey)
Sets the API key of your applitools Eyes account.
|
void |
setAppEnvironment(String arg0,
String arg1) |
void |
setBatch(com.applitools.eyes.BatchInfo arg0) |
void |
setBranchName(String arg0) |
protected void |
setLastScreenshot(com.applitools.eyes.EyesScreenshot arg0) |
static void |
setLogHandler(com.applitools.eyes.LogHandler logHandler)
Sets a handler of log messages generated by this API.
|
void |
setMatchTimeout(int seconds)
Sets the maximal time (in seconds)
checkWindow(com.applitools.eyes.Region, java.lang.String) waits for a
match. |
protected void |
setMatchWindowTask(com.applitools.eyes.MatchWindowTask matchWindowTask) |
void |
setParentBranchName(String arg0) |
static void |
setProxy(com.applitools.eyes.ProxySettings proxySettings)
Sets a proxy.
|
void |
setSaveFailedTests(boolean arg0) |
void |
setSaveNewTests(boolean arg0) |
protected void |
setViewportSize(com.applitools.eyes.RectangleSize size) |
protected void |
startSession() |
protected static final com.applitools.eyes.MatchLevel DEFAULT_MATCH_LEVEL
public static final String DEFAULT_CHARSET_NAME
protected com.applitools.eyes.AgentConnector agentConnector
protected com.applitools.eyes.RunningSession runningSession
protected com.applitools.eyes.SessionStartInfo sessionStartInfo
protected com.applitools.eyes.RectangleSize viewportSize
protected com.applitools.eyes.EyesScreenshot lastScreenshot
public Eyes(URI serverUrl, boolean isDisabled)
serverUrl - The Eyes server URL.isDisabled - If true, all interactions with this API will be
silently ignored.public Eyes(URI serverUrl)
serverUrl - The Eyes server URL.public Eyes()
public static void setLogHandler(com.applitools.eyes.LogHandler logHandler)
logHandler - Handles log messages generated by this API.public static void setApiKey(String apiKey)
public static String getApiKey()
null if no key is set.public static void setProxy(com.applitools.eyes.ProxySettings proxySettings)
null to remove existing proxy settings.public static com.applitools.eyes.ProxySettings getProxy()
public String getAgentId()
public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize,
com.applitools.eyes.MatchLevel matchLevel,
com.applitools.eyes.FailureReports failureReports)
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.matchLevel - The test-wide match level to use when comparing
actual application outputs with expected outputs
(overrides stricter step-specific match levels).failureReports - Specifies how detected failures are reported.public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize,
com.applitools.eyes.MatchLevel matchLevel)
open(org.openqa.selenium.WebDriver, java.lang.String, java.lang.String, com.applitools.eyes.RectangleSize, com.applitools.eyes.MatchLevel, com.applitools.eyes.FailureReports).public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize,
com.applitools.eyes.FailureReports failureReports)
public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName,
com.applitools.eyes.RectangleSize viewportSize)
open(org.openqa.selenium.WebDriver, java.lang.String, java.lang.String, com.applitools.eyes.RectangleSize, com.applitools.eyes.MatchLevel, com.applitools.eyes.FailureReports).public org.openqa.selenium.WebDriver open(org.openqa.selenium.WebDriver driver,
String appName,
String testName)
open(org.openqa.selenium.WebDriver, java.lang.String, java.lang.String, com.applitools.eyes.RectangleSize, com.applitools.eyes.MatchLevel, com.applitools.eyes.FailureReports)protected void checkWindow(com.applitools.eyes.Region region,
String tag)
region - The screen region to check or the empty rectangle to check
the entire window.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 checkWindow(String tag)
tag - A tag to be associated with the snapshot.TestFailedException - Thrown if a mismatch is detected and
immediate failure reports are enabled.public void checkWindow()
TestFailedException - Thrown if a mismatch is detected and
immediate failure reports are enabled.public void checkRegion(org.openqa.selenium.By selector,
String tag)
selector - Selects the region to check.tag - An optional tag to be associated with the snapshot.TestFailedException - if a mismatch is detected and
immediate failure reports are enabledprotected void setMatchWindowTask(com.applitools.eyes.MatchWindowTask matchWindowTask)
public void setMatchTimeout(int seconds)
checkWindow(com.applitools.eyes.Region, java.lang.String) waits for a
match.seconds - Total number of seconds to wait for a match.protected String getTitle()
protected com.applitools.eyes.RectangleSize getViewportSize()
protected void setViewportSize(com.applitools.eyes.RectangleSize size)
protected String getInferredEnvironment()
protected void startSession()
protected com.applitools.eyes.AppEnvironment getEnvironment()
public boolean getIsDisabled()
public boolean getIsOpen()
public com.applitools.eyes.FailureReports getFailureReports()
public boolean getSaveNewTests()
public void setSaveNewTests(boolean arg0)
public boolean getSaveFailedTests()
public void setSaveFailedTests(boolean arg0)
public void open(String arg0, String arg1, com.applitools.eyes.RectangleSize arg2, com.applitools.eyes.MatchLevel arg3, com.applitools.eyes.FailureReports arg4)
public com.applitools.eyes.TestResults close()
public void abortIfNotClosed()
public void setBranchName(String arg0)
public void setParentBranchName(String arg0)
public void setBatch(com.applitools.eyes.BatchInfo arg0)
public static URI getDefaultServerUrl()
protected void setLastScreenshot(com.applitools.eyes.EyesScreenshot arg0)
protected com.applitools.eyes.EyesScreenshot getLastScreenshot()
protected void checkRegion(BufferedImage arg0, com.applitools.eyes.Region arg1, String arg2, boolean arg3)
protected void checkWindow(BufferedImage arg0, String arg1, boolean arg2)
protected void addUserInput(com.applitools.eyes.Trigger arg0)
protected void clearUserInputs()
protected com.applitools.eyes.Trigger[] getUserInputs()
protected void addMouseTrigger(com.applitools.eyes.MouseAction arg0,
com.applitools.eyes.Region arg1,
com.applitools.eyes.Location arg2)
protected void addTextTrigger(com.applitools.eyes.Region arg0,
String arg1)
Copyright © 2014. All rights reserved.