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 |
shootElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element,
Capture capture)
To be used when need to screenshot particular element.
|
static ElementSnapshot |
shootElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element,
Capture capture,
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 |
shootFrame(org.openqa.selenium.WebDriver driver,
String frameId)
To be used when screenshotting the frame
Takes full frame screenshot be default
|
static PageSnapshot |
shootFrame(org.openqa.selenium.WebDriver driver,
String frameId,
Capture capture)
To be used when screenshotting the frame
and need to scroll while making screenshots, either vertically or
horizontally or both directions.
|
static PageSnapshot |
shootFrame(org.openqa.selenium.WebDriver driver,
String frameId,
Capture capture,
boolean useDevicePixelRatio)
To be used when screenshotting the frame
and need to scroll while making screenshots, either vertically or
horizontally or both directions.
|
static PageSnapshot |
shootFrame(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement frame,
Capture capture)
To be used when screenshotting the frame
and need to scroll while making screenshots, either vertically or
horizontally or both directions.
|
static PageSnapshot |
shootFrame(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement frame,
Capture capture,
boolean useDevicePixelRatio)
To be used when screenshotting the frame
and need to scroll while making screenshots, either vertically or
horizontally or both directions.
|
static PageSnapshot |
shootFrame(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement frame,
Capture capture,
int betweenScrollTimeout,
boolean useDevicePixelRatio)
To be used when screenshotting the frame
and need to scroll while making screenshots, either vertically or
horizontally or both directions.
|
static PageSnapshot |
shootPage(org.openqa.selenium.WebDriver driver)
Make screenshot of the viewport only.
|
static PageSnapshot |
shootPage(org.openqa.selenium.WebDriver driver,
boolean useDevicePixelRatio)
Make screenshot of the viewport only.
|
static PageSnapshot |
shootPage(org.openqa.selenium.WebDriver driver,
Capture capture)
To be used when screenshotting the page
and need to scroll while making screenshots, either vertically or
horizontally or both directions.
|
static PageSnapshot |
shootPage(org.openqa.selenium.WebDriver driver,
Capture capture,
boolean useDevicePixelRatio)
To be used when screenshotting the page
and need to scroll while making screenshots, either vertically or
horizontally or both directions.
|
static PageSnapshot |
shootPage(org.openqa.selenium.WebDriver driver,
Capture capture,
int betweenScrollTimeout)
To be used when screenshotting the page
and need to scroll while making screenshots, either vertically or
horizontally or both directions.
|
static PageSnapshot |
shootPage(org.openqa.selenium.WebDriver driver,
Capture capture,
int betweenScrollTimeout,
boolean useDevicePixelRatio)
To be used when screenshotting the page
and need to scroll while making screenshots, 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 to account for device pixel
ratiopublic static PageSnapshot shootPage(org.openqa.selenium.WebDriver driver, Capture capture)
driver - WebDriver instancecapture - Capture typepublic static PageSnapshot shootPage(org.openqa.selenium.WebDriver driver, Capture capture, int betweenScrollTimeout)
driver - WebDriver instancecapture - Capture typebetweenScrollTimeout - 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, Capture capture, boolean useDevicePixelRatio)
driver - WebDriver instancecapture - Capture typeuseDevicePixelRatio - whether to account for device pixel ratiopublic static PageSnapshot shootPage(org.openqa.selenium.WebDriver driver, Capture capture, int betweenScrollTimeout, boolean useDevicePixelRatio)
driver - WebDriver instancecapture - Capture typebetweenScrollTimeout - Timeout to wait between each scrolling operationuseDevicePixelRatio - whether to account for 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, Capture capture)
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 screenshotuseDevicePixelRatio - whether to account for device pixel ratiopublic static ElementSnapshot shootElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element, Capture capture, boolean useDevicePixelRatio)
driver - WebDriver instanceelement - WebElement instance to be screenshotcapture - Capture typeuseDevicePixelRatio - whether to account for 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 screenshotuseDevicePixelRatio - whether to account for device pixel ratiopublic static PageSnapshot shootFrame(org.openqa.selenium.WebDriver driver, String frameId, Capture capture, boolean useDevicePixelRatio)
driver - WebDriver instancecapture - Capture typeuseDevicePixelRatio - whether to account for device pixel ratiopublic static PageSnapshot shootFrame(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement frame, Capture capture, boolean useDevicePixelRatio)
driver - WebDriver instancecapture - Capture typeuseDevicePixelRatio - whether to account for device pixel ratiopublic static PageSnapshot shootFrame(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement frame, Capture capture)
driver - WebDriver instancecapture - Capture typepublic static PageSnapshot shootFrame(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement frame, Capture capture, int betweenScrollTimeout, boolean useDevicePixelRatio)
driver - WebDriver instanceframe - Frame WebElementcapture - Capture typebetweenScrollTimeout - Timeout to wait between each scrolling operationuseDevicePixelRatio - whether to account for device pixel ratiopublic static PageSnapshot shootFrame(org.openqa.selenium.WebDriver driver, String frameId, Capture capture)
driver - WebDriver instanceframeId - Id of the frame elementcapture - Capture typepublic static PageSnapshot shootFrame(org.openqa.selenium.WebDriver driver, String frameId)
driver - WebDriver instanceframeId - Id of the frame elementCopyright © 2020. All rights reserved.