Class WebDriverPhotoLens

java.lang.Object
net.serenitybdd.core.photography.WebDriverPhotoLens
All Implemented Interfaces:
PhotoLens

public class WebDriverPhotoLens
extends java.lang.Object
implements PhotoLens
Take a screenshot with a specified WebDriver instance. By default screenshots will be taken using standard Selenium. You can override the default behaviour by setting the screenshot.shooter property
  • Constructor Summary

    Constructors
    Constructor Description
    WebDriverPhotoLens​(org.openqa.selenium.WebDriver driver)  
  • Method Summary

    Modifier and Type Method Description
    org.openqa.selenium.WebDriver getDriver()  
    byte[] takeScreenshot()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WebDriverPhotoLens

      public WebDriverPhotoLens​(org.openqa.selenium.WebDriver driver)
  • Method Details

    • getDriver

      public org.openqa.selenium.WebDriver getDriver()
    • takeScreenshot

      public byte[] takeScreenshot() throws java.io.IOException
      Specified by:
      takeScreenshot in interface PhotoLens
      Throws:
      java.io.IOException