public class Shutterbug
extends java.lang.Object
| Constructor and Description |
|---|
Shutterbug() |
| Modifier and Type | Method and Description |
|---|---|
static ElementSnapshot |
shootElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element)
To be used when need to screenshot particular element.
|
static ElementSnapshot |
shootElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element,
boolean useDevicePixelRatio)
To be used when need to screenshot particular element.
|
static PageSnapshot |
shootPage(org.openqa.selenium.WebDriver driver)
Make screen shot of the viewport only.
|
static PageSnapshot |
shootPage(org.openqa.selenium.WebDriver driver,
boolean useDevicePixelRatio)
Make screen shot of the viewport only.
|
static PageSnapshot |
shootPage(org.openqa.selenium.WebDriver driver,
ScrollStrategy scroll)
To be used when screen shooting the page
and need to scroll while making screen shots, either vertically or
horizontally or both directions (Chrome).
|
static PageSnapshot |
shootPage(org.openqa.selenium.WebDriver driver,
ScrollStrategy scroll,
int scrollTimeout)
To be used when screen shooting the page
and need to scroll while making screen shots, either vertically or
horizontally or both directions (Chrome).
|
static PageSnapshot |
shootPage(org.openqa.selenium.WebDriver driver,
ScrollStrategy scroll,
int scrollTimeout,
boolean useDevicePixelRatio)
To be used when screen shooting the page
and need to scroll while making screen shots, either vertically or
horizontally or both directions (Chrome).
|
public static PageSnapshot shootPage(org.openqa.selenium.WebDriver driver)
driver - WebDriver instancepublic static PageSnapshot shootPage(org.openqa.selenium.WebDriver driver, boolean useDevicePixelRatio)
driver - WebDriver instanceuseDevicePixelRatio - whether or not take into account device pixel ratiopublic static PageSnapshot shootPage(org.openqa.selenium.WebDriver driver, ScrollStrategy scroll)
driver - WebDriver instancescroll - ScrollStrategy How you need to scrollpublic static PageSnapshot shootPage(org.openqa.selenium.WebDriver driver, ScrollStrategy scroll, int scrollTimeout)
driver - WebDriver instancescroll - ScrollStrategy How you need to scrollscrollTimeout - Timeout to wait after scrolling and before taking screen shotpublic static PageSnapshot shootPage(org.openqa.selenium.WebDriver driver, ScrollStrategy scroll, int scrollTimeout, boolean useDevicePixelRatio)
driver - WebDriver instancescroll - ScrollStrategy How you need to scrollscrollTimeout - Timeout to wait after scrolling and before taking screen shotuseDevicePixelRatio - whether or not take into account device pixel ratiopublic static ElementSnapshot shootElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element)
driver - WebDriver instanceelement - WebElement instance to be screenshottedpublic static ElementSnapshot shootElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element, boolean useDevicePixelRatio)
driver - WebDriver instanceelement - WebElement instance to be screen shotuseDevicePixelRatio - whether or not take into account device pixel ratio