public class Screenshots
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static ScreenShotLaboratory |
screenshots |
| Constructor and Description |
|---|
Screenshots() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.io.File> |
finishContext() |
static java.util.Optional<java.io.File> |
getLastContextScreenshot()
Get the last screenshot taken in current
context thread |
static java.io.File |
getLastScreenshot()
Get the last screenshot taken
|
static java.util.Optional<java.io.File> |
getLastThreadScreenshot()
Get the last screenshot taken in current thread
|
static java.lang.String |
saveScreenshotAndPageSource() |
static void |
startContext(java.lang.String className,
java.lang.String methodName) |
static java.lang.String |
takeScreenShot(java.lang.String fileName)
Deprecated.
|
static Screenshot |
takeScreenShot(java.lang.String className,
java.lang.String methodName) |
static java.io.File |
takeScreenShot(WebElement element)
Take screenshot of the WebElement/SelenideElement
|
static java.io.File |
takeScreenShot(WebElement iframe,
WebElement element)
Take screenshot of WebElement/SelenideElement in iframe
for partially visible WebElement/Selenide horizontal scroll bar will be present
|
static java.io.File |
takeScreenShotAsFile()
Take screenshot and return as a file
|
static java.awt.image.BufferedImage |
takeScreenShotAsImage(WebElement element)
Take screenshot of the WebElement/SelenideElement
|
static java.awt.image.BufferedImage |
takeScreenShotAsImage(WebElement iframe,
WebElement element)
Take screenshot of WebElement/SelenideElement in iframe
for partially visible WebElement/Selenide horizontal scroll bar will be present
|
public static ScreenShotLaboratory screenshots
public static java.lang.String saveScreenshotAndPageSource()
public static Screenshot takeScreenShot(java.lang.String className, java.lang.String methodName)
@Deprecated public static java.lang.String takeScreenShot(java.lang.String fileName)
Selenide.screenshot(java.lang.String) or SelenideDriver.screenshot(java.lang.String)public static java.io.File takeScreenShotAsFile()
public static java.io.File takeScreenShot(WebElement element)
public static java.io.File takeScreenShot(WebElement iframe,
WebElement element)
public static java.awt.image.BufferedImage takeScreenShotAsImage(WebElement iframe,
WebElement element)
public static java.awt.image.BufferedImage takeScreenShotAsImage(WebElement element)
public static void startContext(java.lang.String className,
java.lang.String methodName)
public static java.util.List<java.io.File> finishContext()
public static java.io.File getLastScreenshot()
public static java.util.Optional<java.io.File> getLastThreadScreenshot()
Optional with screenshot of current thread,
or an empty Optional if there were no any screenshots taken.public static java.util.Optional<java.io.File> getLastContextScreenshot()
context threadOptional with screenshot of current context thread,
or an empty Optional if there were no any screenshots taken.