public class Shutterbug extends Object
| 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 ElementSnapshot |
shootElementVerticallyCentered(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element)
To be used when need to screenshot particular element by vertically centering it in viewport.
|
static ElementSnapshot |
shootElementVerticallyCentered(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element,
boolean useDevicePixelRatio)
To be used when need to screenshot particular element by vertically centering it within viewport.
|
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,
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).
|
static PageSnapshot |
shootPage(org.openqa.selenium.WebDriver driver,
ScrollStrategy scroll,
int betweenScrollTimeout)
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 betweenScrollTimeout,
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).
|
static Shutterbug |
wait(org.openqa.selenium.support.ui.ExpectedCondition<?> cond,
int timeout)
Wait for condition to be true before taking screenshot
|
static Shutterbug |
wait(int timeout)
Wait for before taking screenshot
|
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 betweenScrollTimeout)
driver - WebDriver instancescroll - ScrollStrategy How you need to scrollbetweenScrollTimeout - Timeout to wait after scrolling and before taking screenshotpublic static Shutterbug wait(org.openqa.selenium.support.ui.ExpectedCondition<?> cond, int timeout)
cond - conditiontimeout - timeout wait for conditionpublic static Shutterbug wait(int timeout)
timeout - timeout wait for conditionpublic static PageSnapshot shootPage(org.openqa.selenium.WebDriver driver, ScrollStrategy scroll, boolean useDevicePixelRatio)
driver - WebDriver instancescroll - ScrollStrategy How you need to scrolluseDevicePixelRatio - whether or not take into account device pixel ratiopublic static PageSnapshot shootPage(org.openqa.selenium.WebDriver driver, ScrollStrategy scroll, int betweenScrollTimeout, boolean useDevicePixelRatio)
driver - WebDriver instancescroll - ScrollStrategy How you need to scrollbetweenScrollTimeout - Timeout to wait between each scrolling operationuseDevicePixelRatio - whether or not take into account device pixel ratiopublic static ElementSnapshot shootElementVerticallyCentered(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)
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 ratiopublic static ElementSnapshot shootElementVerticallyCentered(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 ratioCopyright © 2020. All rights reserved.