public class NamedScreenshotOnFailure
extends ScreenshotOnFailureRule
ScreenshotOnFailureRule
. The file names created by this
class follow this convention:
Constructor and Description |
---|
NamedScreenshotOnFailure(HasDriver driverHolder)
Creates a new junit rule to take screenshots in case of failure.
|
NamedScreenshotOnFailure(HasDriver driverHolder,
boolean quitDriverOnFinish)
Creates a new junit rule to take screenshots in case of failure.
|
NamedScreenshotOnFailure(String browserName,
HasDriver driverHolder)
Creates a new junit rule to take screenshots in case of failure.
|
NamedScreenshotOnFailure(String browserName,
HasDriver driverHolder,
boolean quitDriverOnFinish)
Creates a new junit rule to take screenshots in case of failure.
|
Modifier and Type | Method and Description |
---|---|
protected File |
getErrorScreenshotFile(Description description) |
void |
setName(String browserName)
Set the browser name to be attached to screenshot filename.
|
public NamedScreenshotOnFailure(HasDriver driverHolder, boolean quitDriverOnFinish)
driverHolder
- The HasDriver
instance that holds the active WebDriver
instance. Commonly this is the TestBenchTestCase
.quitDriverOnFinish
- Tells the rule whether to quit the driver when a single test
has finished or not.public NamedScreenshotOnFailure(HasDriver driverHolder)
driverHolder
- The HasDriver
instance that holds the active WebDriver
instance. Commonly this is the TestBenchTestCase
.public NamedScreenshotOnFailure(String browserName, HasDriver driverHolder, boolean quitDriverOnFinish)
browserName
- - browser name attached to screenshot filenamedriverHolder
- The HasDriver
instance that holds the active WebDriver
instance. Commonly this is the TestBenchTestCase
.quitDriverOnFinish
- Tells the rule whether to quit the driver when a single test
has finished or not.public NamedScreenshotOnFailure(String browserName, HasDriver driverHolder)
browserName
- - browser name attached to screenshot filenamedriverHolder
- The HasDriver
instance that holds the active WebDriver
instance. Commonly this is the TestBenchTestCase
.Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.