Package com.codeborne.selenide.testng
Class ScreenShooter
java.lang.Object
org.testng.reporters.ExitCodeListener
com.codeborne.selenide.testng.ScreenShooter
- All Implemented Interfaces:
org.testng.IConfigurationListener,org.testng.internal.IResultListener,org.testng.internal.IResultListener2,org.testng.ITestListener,org.testng.ITestNGListener
public class ScreenShooter
extends org.testng.reporters.ExitCodeListener
Annotate your test class with @Listeners({ ScreenShooter.class})
Restrictions:
This listener can only take screenshots for "static" webdriver managed by Selenide.
It doesn't take screenshots for webdrivers created by your code, e.g. using new SelenideDriver().
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonTestFailure(org.testng.ITestResult result) voidonTestStart(org.testng.ITestResult result) voidonTestSuccess(org.testng.ITestResult result) Methods inherited from class org.testng.reporters.ExitCodeListener
onConfigurationFailure, onConfigurationSkip, onConfigurationSuccess, onStart, onTestFailedButWithinSuccessPercentage, onTestSkippedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.testng.IConfigurationListener
beforeConfiguration, beforeConfiguration, onConfigurationFailure, onConfigurationSkip, onConfigurationSuccessMethods inherited from interface org.testng.ITestListener
onFinish, onTestFailedWithTimeoutMethods inherited from interface org.testng.ITestNGListener
isEnabled
-
Field Details
-
captureSuccessfulTests
public static boolean captureSuccessfulTests
-
-
Constructor Details
-
ScreenShooter
public ScreenShooter()
-
-
Method Details
-
onTestStart
public void onTestStart(org.testng.ITestResult result) - Specified by:
onTestStartin interfaceorg.testng.ITestListener- Overrides:
onTestStartin classorg.testng.reporters.ExitCodeListener
-
onTestFailure
public void onTestFailure(org.testng.ITestResult result) - Specified by:
onTestFailurein interfaceorg.testng.ITestListener- Overrides:
onTestFailurein classorg.testng.reporters.ExitCodeListener
-
onTestSuccess
public void onTestSuccess(org.testng.ITestResult result) - Specified by:
onTestSuccessin interfaceorg.testng.ITestListener- Overrides:
onTestSuccessin classorg.testng.reporters.ExitCodeListener
-