public class Parameters extends Object
| Constructor and Description |
|---|
Parameters() |
| Modifier and Type | Method and Description |
|---|---|
static List<org.openqa.selenium.remote.DesiredCapabilities> |
getGridBrowsers()
Parses the grid browsers string and returns a new List of
DesiredCapabilities
|
static String |
getGridBrowsersString() |
static String |
getHubHostname()
Gets host name of the hub to run tests on.
|
static int |
getMaxAttempts()
Gets the maximum number of times to run the test in case of a random
failure.
|
static int |
getMaxScreenshotRetries() |
static int |
getMaxThreads()
Deprecated.
|
static String |
getRunLocallyBrowserName()
Gets the name of the browser to use for a local test.
|
static String |
getRunLocallyBrowserVersion()
Gets the version of the browser to use for a local test.
|
static double |
getScreenshotComparisonTolerance() |
static String |
getScreenshotErrorDirectory() |
static String |
getScreenshotReferenceDirectory() |
static int |
getScreenshotRetryDelay() |
static int |
getTestsInParallel() |
static int |
getTestSuitesInParallel() |
static boolean |
isCaptureScreenshotOnFailure()
Deprecated.
This does nothing, use
ScreenshotOnFailureRule |
static boolean |
isDebug() |
static boolean |
isHeadless()
Checks if requested to run browsers in headless mode when runnning on a local machine using a browser supporting it (currently Chrome and Firefox).
|
static boolean |
isLocalWebDriverUsed() |
static boolean |
isScreenshotComparisonCursorDetection()
Tells whether to treat screen shots with the only difference being a text
input cursor as equal or not.
|
static void |
setCaptureScreenshotOnFailure(boolean isCaptureScreenshotOnFailure)
Deprecated.
This does nothing, use
ScreenshotOnFailureRule |
static void |
setDebug(boolean isDebug)
Turns debugging info on/off
|
static void |
setGridBrowsers(String browsers)
Sets the default browsers used in test grid if not overridden in a
ParallelTest
|
static void |
setHeadless(boolean headless)
Sets whether to run browsers in headless mode when runnning on a local machine using a browser supporting it (currently Chrome and Firefox).
|
static void |
setMaxAttempts(int maxAttempts)
Sets the maximum number of times to run the test in case of a random
failure
|
static void |
setMaxScreenshotRetries(int maxRetries)
Sets the maximum allowed retries when comparing screen shots.
|
static void |
setMaxThreads(int maxThreads)
Deprecated.
|
static void |
setScreenshotComparisonCursorDetection(boolean isScreenshotComparisonCursorDetection)
Turns cursor detection on/off when comparing screen shots.
|
static void |
setScreenshotComparisonTolerance(double tolerance)
Sets the error tolerance for screen shot comparisons.
|
static void |
setScreenshotErrorDirectory(String screenshotErrorDirectory)
Sets the directory where error screen shots are stored.
|
static void |
setScreenshotReferenceDirectory(String screenshotReferenceDirectory)
Sets the directory to search for reference images.
|
static void |
setScreenshotRetryDelay(int retryDelay)
Sets the delay between screen shot comparison retries.
|
static void |
setTestsInParallel(int testsInParallel)
Sets the maximum number of tests to run in parallel.
|
static void |
setTestSuitesInParallel(int testSuitesInParallel)
Sets the maximum number of test suites to run in parallel.
|
public static void setDebug(boolean isDebug)
isDebug - public static boolean isDebug()
public static void setScreenshotComparisonCursorDetection(boolean isScreenshotComparisonCursorDetection)
isScreenshotComparisonCursorDetection - public static boolean isScreenshotComparisonCursorDetection()
public static void setScreenshotReferenceDirectory(String screenshotReferenceDirectory)
screenshotReferenceDirectory - public static String getScreenshotReferenceDirectory()
public static void setScreenshotErrorDirectory(String screenshotErrorDirectory)
screenshotErrorDirectory - public static String getScreenshotErrorDirectory()
public static void setScreenshotComparisonTolerance(double tolerance)
tolerance - the error tolerance.public static double getScreenshotComparisonTolerance()
@Deprecated public static void setCaptureScreenshotOnFailure(boolean isCaptureScreenshotOnFailure)
ScreenshotOnFailureRuleisCaptureScreenshotOnFailure - UnsupportedOperationException@Deprecated public static boolean isCaptureScreenshotOnFailure()
ScreenshotOnFailureRuleUnsupportedOperationExceptionpublic static void setMaxScreenshotRetries(int maxRetries)
maxRetries - public static int getMaxScreenshotRetries()
public static void setScreenshotRetryDelay(int retryDelay)
retryDelay - the delay in milliseconds.public static int getScreenshotRetryDelay()
@Deprecated public static int getMaxThreads()
getTestsInParallel()@Deprecated public static void setMaxThreads(int maxThreads)
setTestsInParallel(int)maxThreads - maximum number of tests to run in parallel.public static void setTestsInParallel(int testsInParallel)
testsInParallel - maximum number of tests to run in parallel.public static int getTestsInParallel()
public static void setTestSuitesInParallel(int testSuitesInParallel)
testSuitesInParallel - maximum number of testSuites to run in parallel.public static int getTestSuitesInParallel()
public static String getHubHostname()
This will override any @RunOnHub annotation present on
the test class.
public static String getRunLocallyBrowserName()
Reads the value from the
com.vaadin.testbench.Parameters.runLocally system property. If
the parameter is defined, it will override any
@RunLocally annotation.
The format of the system property is "[browsername]" or "[browsername]-[version]" where the version is optional.
If the system property is defined, the test will be run locally and not
on a hub. The property effectively does the same thing as a
@RunLocally annotation on the test class.
public static String getRunLocallyBrowserVersion()
Reads the value from the
com.vaadin.testbench.Parameters.runLocally system property. If
the parameter is defined, it will override any
@RunLocally annotation.
The format of the system property is "[browsername]" or "[browsername]-[version]" where the version is optional.
public static boolean isLocalWebDriverUsed()
public static int getMaxAttempts()
RetryRule for details.public static void setMaxAttempts(int maxAttempts)
maxAttempts - maximum attempts the test can be run.public static String getGridBrowsersString()
public static List<org.openqa.selenium.remote.DesiredCapabilities> getGridBrowsers()
public static void setGridBrowsers(String browsers)
browsers - comma separated list of browsers e.g.
"ie11,chrome,safari-9,firefox-53"public static boolean isHeadless()
true, if requested to run in headless mode,
false otherwisepublic static void setHeadless(boolean headless)
headless - true, to run in headless mode,
false otherwiseCopyright © 2020-2021 Vaadin Ltd. All Rights Reserved.