Package com.saucelabs.visual
Class VisualApi
- java.lang.Object
-
- com.saucelabs.visual.VisualApi
-
public class VisualApi extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVisualApi.BuildAttributesstatic classVisualApi.BuilderCreates a VisualApi instance using builder style
-
Constructor Summary
Constructors Constructor Description VisualApi(org.openqa.selenium.remote.RemoteWebDriver driver, DataCenter region, String username, String accessKey)Creates a VisualApi instance for a given Visual BackendDataCenterVisualApi(org.openqa.selenium.remote.RemoteWebDriver driver, String url, String username, String accessKey)Creates a VisualApi instance with a custom backend URLVisualApi(org.openqa.selenium.remote.RemoteWebDriver driver, String url, String username, String accessKey, VisualApi.BuildAttributes buildAttributes)Creates a VisualApi instance with a custom backend URL
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcheck(String name)Deprecated.Use sauceVisualCheck().voidcheck(String name, CheckOptions options)Deprecated.Use sauceVisualCheck().Map<com.saucelabs.visual.graphql.type.DiffStatus,Integer>checkResults()Deprecated.Use sauceVisualResults().VisualBuildgetBuild()voidrefreshWebDriverSessionInfo()voidsauceVisualCheck(String snapshotName)Uploads and creates a snapshot with a given name and default optionsvoidsauceVisualCheck(String snapshotName, CheckOptions options)Uploads and creates a snapshot with a given snapshotName and optionsMap<com.saucelabs.visual.graphql.type.DiffStatus,Integer>sauceVisualResults()Return the current processing status of uploaded snapshots.
-
-
-
Constructor Detail
-
VisualApi
public VisualApi(org.openqa.selenium.remote.RemoteWebDriver driver, DataCenter region, String username, String accessKey)Creates a VisualApi instance for a given Visual BackendDataCenter- Parameters:
driver- TheWebDriverinstance where the tests should run atregion- Visual Backend Region. For available values, see:DataCenterusername- SauceLabs usernameaccessKey- SauceLabs access key
-
VisualApi
public VisualApi(org.openqa.selenium.remote.RemoteWebDriver driver, String url, String username, String accessKey)Creates a VisualApi instance with a custom backend URL- Parameters:
driver- TheWebDriverinstance where the tests should run aturl- Visual Backend URLusername- SauceLabs usernameaccessKey- SauceLabs access key
-
VisualApi
public VisualApi(org.openqa.selenium.remote.RemoteWebDriver driver, String url, String username, String accessKey, VisualApi.BuildAttributes buildAttributes)Creates a VisualApi instance with a custom backend URL- Parameters:
driver- TheWebDriverinstance where the tests should run withurl- Visual Backend URLusername- SauceLabs usernameaccessKey- SauceLabs access keybuildAttributes- like buildName, project, branch
-
-
Method Detail
-
check
public void check(String name)
Deprecated.Use sauceVisualCheck(). check() will be removed in a future version.Uploads and creates a snapshot with a given name and default options- Parameters:
name- A name for the snapshot
-
check
public void check(String name, CheckOptions options)
Deprecated.Use sauceVisualCheck(). check() will be removed in a future version.Uploads and creates a snapshot with a given name and default options- Parameters:
name- A name for the snapshotoptions- Options for the API
-
sauceVisualCheck
public void sauceVisualCheck(String snapshotName)
Uploads and creates a snapshot with a given name and default options- Parameters:
snapshotName- A name for the snapshot
-
sauceVisualCheck
public void sauceVisualCheck(String snapshotName, CheckOptions options)
Uploads and creates a snapshot with a given snapshotName and options- Parameters:
snapshotName- A name for the snapshotoptions- Options for the API
-
checkResults
public Map<com.saucelabs.visual.graphql.type.DiffStatus,Integer> checkResults()
Deprecated.Use sauceVisualResults(). checkResults() will be removed in a future version.Return the current processing status of uploaded snapshots.- Returns:
- A map of DiffStatus and its count of snapshot in that status.
-
sauceVisualResults
public Map<com.saucelabs.visual.graphql.type.DiffStatus,Integer> sauceVisualResults()
Return the current processing status of uploaded snapshots.- Returns:
- A map of DiffStatus and its count of snapshot in that status.
-
refreshWebDriverSessionInfo
public void refreshWebDriverSessionInfo()
-
getBuild
public VisualBuild getBuild()
-
-