public class PageSnapshot extends Snapshot
| Modifier and Type | Method and Description |
|---|---|
PageSnapshot |
blur()
Blur the entire page.
|
PageSnapshot |
blur(org.openqa.selenium.WebElement element)
Blur provided element within the page only.
|
PageSnapshot |
blurExcept(org.openqa.selenium.WebElement element)
Blurs all the page except the element provided.
|
PageSnapshot |
cropAround(org.openqa.selenium.WebElement element,
int offsetX,
int offsetY)
Crop the image around specified element with offset.
|
PageSnapshot |
highlight(org.openqa.selenium.WebElement element)
Highlights WebElement within the page with Color.red
and line width 3.
|
PageSnapshot |
highlight(org.openqa.selenium.WebElement element,
Color color,
int lineWidth)
Highlights WebElement within the page with provided color
and line width.
|
PageSnapshot |
highlightWithText(org.openqa.selenium.WebElement element,
Color elementColor,
int lineWidth,
String text,
Color textColor,
Font textFont)
Highlight WebElement within the page, same as in
highlight(WebElement)
but providing ability to override default color, font values. |
PageSnapshot |
highlightWithText(org.openqa.selenium.WebElement element,
String text)
Highlight WebElement within the page (same as in
highlight(WebElement)}
and adding provided text above highlighted element. |
PageSnapshot |
monochrome(org.openqa.selenium.WebElement element)
Makes an element withing a page 'monochrome' - applies gray-and-white filter.
|
protected PageSnapshot |
self() |
equals, equals, equals, equals, equals, equals, equalsWithDiff, equalsWithDiff, equalsWithDiff, equalsWithDiff, equalsWithDiff, equalsWithDiff, getBytes, getImage, hashCode, monochrome, save, save, setImage, withCroppedThumbnail, withCroppedThumbnail, withCroppedThumbnail, withCroppedThumbnail, withName, withThumbnail, withThumbnail, withThumbnail, withTitlepublic PageSnapshot highlight(org.openqa.selenium.WebElement element)
element - WebElement to be highlightedpublic PageSnapshot highlight(org.openqa.selenium.WebElement element, Color color, int lineWidth)
element - WebElement to be highlightedcolor - color of the linelineWidth - width of the linepublic PageSnapshot highlightWithText(org.openqa.selenium.WebElement element, String text)
highlight(WebElement)}
and adding provided text above highlighted element.element - WebElement to be highlighted with Color.red
and line width 3text - test to be places above highlighted element with
Color.red, font "Serif", BOLD, size 20public PageSnapshot highlightWithText(org.openqa.selenium.WebElement element, Color elementColor, int lineWidth, String text, Color textColor, Font textFont)
highlight(WebElement)
but providing ability to override default color, font values.element - WebElement to be highlightedelementColor - element highlight colorlineWidth - line width around the elementtext - text to be placed above the highlighted elementtextColor - color of the texttextFont - text fontpublic PageSnapshot blur()
public PageSnapshot blur(org.openqa.selenium.WebElement element)
element - WebElement to be blurredpublic PageSnapshot monochrome(org.openqa.selenium.WebElement element)
element - WebElement within the page to be made 'monochrome'public PageSnapshot blurExcept(org.openqa.selenium.WebElement element)
element - WebElement to stay not blurredpublic PageSnapshot cropAround(org.openqa.selenium.WebElement element, int offsetX, int offsetY)
element - WebElement to crop aroundoffsetX - offsetX around element in pxoffsetY - offsetY around element in pxprotected PageSnapshot self()
Copyright © 2020. All rights reserved.