Package net.serenitybdd.core.photography
Interface ScreenShooter
- All Known Implementing Classes:
WebDriverScreenShooter
public interface ScreenShooter
Implement this interface if you want to implement your own WebDriver screenshot logic.
Any class that implements this method must have a constructor with a PhotoLens parameter, e.g.
class WebDriverScreenShooter {
WebDriver driver;
public WebDriverScreenShooter(PhotoLens lens) {
this.driver = ((WebDriverPhotoLens) lens).getDriver();
}
}
You can use your custom ScreenShooter class by setting the `serenity.screenshooter` property to the fully qualified
classname of your class.-
Method Summary
Modifier and Type Method Description byte[]
takeScreenshot()
-
Method Details
-
takeScreenshot
byte[] takeScreenshot() throws java.io.IOException- Throws:
java.io.IOException
-