|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TakesScreenshot
Indicates a driver that can capture a screenshot and store it in different ways.
Example usage:
import static openqa.selenium.OutputType.*; File screenshotFile = ((Screenshot)driver).getScreenshotAs(file); String screenshotBase64 = ((Screenshot)driver).getScreenshotAs(base64);
OutputType| Method Summary | ||
|---|---|---|
|
getScreenshotAs(OutputType<X> target)
Capture the screenshot and store it in the specified location. |
|
| Method Detail |
|---|
<X> X getScreenshotAs(OutputType<X> target)
throws WebDriverException
For WebDriver extending TakesScreenshot, this makes a best effort depending on the browser to return the following in order of preference:
For WebElement extending TakesScreenshot, this makes a best effort depending on the browser to return the following in order of preference: - The entire content of the HTML element - The visisble portion of the HTML element
X - Return type for getScreenshotAs.target - target type, @see OutputType
WebDriverException - on failure.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||