Package | Description |
---|---|
com.microsoft.playwright |
Modifier and Type | Method and Description |
---|---|
Page.ScreenshotOptions |
Page.ScreenshotOptions.setAnimations(ScreenshotAnimations animations)
When set to
"disabled" , stops CSS animations, CSS transitions and Web Animations. |
Page.ScreenshotOptions |
Page.ScreenshotOptions.setCaret(ScreenshotCaret caret)
When set to
"hide" , screenshot will hide text caret. |
Page.ScreenshotOptions |
Page.ScreenshotOptions.setClip(Clip clip)
An object which specifies clipping of the resulting image.
|
Page.ScreenshotOptions |
Page.ScreenshotOptions.setClip(double x,
double y,
double width,
double height)
An object which specifies clipping of the resulting image.
|
Page.ScreenshotOptions |
Page.ScreenshotOptions.setFullPage(boolean fullPage)
When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport.
|
Page.ScreenshotOptions |
Page.ScreenshotOptions.setMask(List<Locator> mask)
Specify locators that should be masked when the screenshot is taken.
|
Page.ScreenshotOptions |
Page.ScreenshotOptions.setOmitBackground(boolean omitBackground)
Hides default white background and allows capturing screenshots with transparency.
|
Page.ScreenshotOptions |
Page.ScreenshotOptions.setPath(Path path)
The file path to save the image to.
|
Page.ScreenshotOptions |
Page.ScreenshotOptions.setQuality(int quality)
The quality of the image, between 0-100.
|
Page.ScreenshotOptions |
Page.ScreenshotOptions.setScale(ScreenshotScale scale)
When set to
"css" , screenshot will have a single pixel per each css pixel on the page. |
Page.ScreenshotOptions |
Page.ScreenshotOptions.setTimeout(double timeout)
Maximum time in milliseconds, defaults to 30 seconds, pass
0 to disable timeout. |
Page.ScreenshotOptions |
Page.ScreenshotOptions.setType(ScreenshotType type)
Specify screenshot type, defaults to
png . |
Modifier and Type | Method and Description |
---|---|
byte[] |
Page.screenshot(Page.ScreenshotOptions options)
Returns the buffer with the captured screenshot.
|
Copyright © 2022. All rights reserved.