public class Screenshot extends Shot<Screenshot>
Constructor and Description |
---|
Screenshot(T driver) |
Modifier and Type | Method and Description |
---|---|
Screenshot |
blur()
Blur the entire page.
|
Screenshot |
blur(org.openqa.selenium.By locator)
Blur provided element within the page only.
|
Screenshot |
blur(org.openqa.selenium.WebElement element)
Blur provided element within the page only.
|
Screenshot |
blurExcept(org.openqa.selenium.By locator)
Blurs all the page except the By provided.
|
Screenshot |
blurExcept(org.openqa.selenium.WebElement element)
Blurs all the page except the WebElement provided.
|
Screenshot |
cover(org.openqa.selenium.By locator)
Cover the provided locator with a singular color (black).
|
Screenshot |
cover(org.openqa.selenium.By locator,
Color color)
Cover the provided locator with the specified color.
|
Screenshot |
cover(com.assertthat.selenium_shutterbug.utils.web.Coordinates coords)
Cover the provided Coordinates with a singular color (black).
|
Screenshot |
cover(com.assertthat.selenium_shutterbug.utils.web.Coordinates coords,
Color color)
Cover the provided Coordinates with the specified color.
|
Screenshot |
cover(org.openqa.selenium.WebElement element)
Cover the provided element with a singular color (black).
|
Screenshot |
cover(org.openqa.selenium.WebElement element,
Color color)
Cover the provided element with the specified color.
|
Screenshot |
highlight(org.openqa.selenium.By locator)
Highlights a By within the page with Color.red and line width 3.
|
Screenshot |
highlight(org.openqa.selenium.By locator,
Color color)
Highlights a By within the page with the specified color and line width 3.
|
Screenshot |
highlight(org.openqa.selenium.By locator,
Color color,
int lineWidth)
Highlights a By within the page with the specified color and line width.
|
Screenshot |
highlight(com.assertthat.selenium_shutterbug.utils.web.Coordinates coords)
Highlights coordinates within the page with Color.red and line width 3.
|
Screenshot |
highlight(org.openqa.selenium.WebElement element)
Highlights WebElement within the page with Color.red and line width 3.
|
Screenshot |
highlight(org.openqa.selenium.WebElement element,
Color color)
Highlights WebElement within the page with provided color and line width of 3.
|
Screenshot |
highlight(org.openqa.selenium.WebElement element,
Color color,
int lineWidth)
Highlights WebElement within the page with provided color and line width.
|
Screenshot |
highlightWithText(org.openqa.selenium.By locator,
Color highlightColor,
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. |
Screenshot |
highlightWithText(org.openqa.selenium.By locator,
String text)
Highlight By within the page (same as in
highlight(By) } and adding provided text above
highlighted element. |
Screenshot |
monochrome(org.openqa.selenium.By locator)
Makes an element within a page 'monochrome' - applies gray-and-white filter.
|
Screenshot |
monochrome(org.openqa.selenium.WebElement element)
Makes an element within a page 'monochrome' - applies gray-and-white filter.
|
protected Screenshot |
self() |
compare, compare, compareTo, compareTo, getFileName, getLocationExtension, getSaveFile, save, setImage, toBase64, withBaseLocation, withLocation, withName, withSuffix, withThumbnail, withTitle
public Screenshot highlight(org.openqa.selenium.By locator)
locator
- By to be highlightedScreenshot
public Screenshot highlight(com.assertthat.selenium_shutterbug.utils.web.Coordinates coords)
coords
- Coordinates to be highlightedScreenshot
public Screenshot highlight(org.openqa.selenium.By locator, Color color)
locator
- By to be highlightedcolor
- The Color
of the lineScreenshot
public Screenshot highlight(org.openqa.selenium.By locator, Color color, int lineWidth)
locator
- By to be highlightedcolor
- The Color
of the linelineWidth
- The width of the lineScreenshot
public Screenshot highlight(org.openqa.selenium.WebElement element)
element
- WebElement to be highlightedScreenshot
public Screenshot highlight(org.openqa.selenium.WebElement element, Color color)
element
- WebElement to be highlightedcolor
- color of the lineScreenshot
public Screenshot highlight(org.openqa.selenium.WebElement element, Color color, int lineWidth)
element
- WebElement to be highlightedcolor
- color of the linelineWidth
- width of the lineScreenshot
public Screenshot highlightWithText(org.openqa.selenium.By locator, String text)
highlight(By)
} and adding provided text above
highlighted element.locator
- By to be highlighted with Color.red and line width 3text
- text to be placed above highlighted element with Color.red, font "Serif", BOLD,
size 20Screenshot
public Screenshot highlightWithText(org.openqa.selenium.By locator, Color highlightColor, int lineWidth, String text, Color textColor, Font textFont)
highlight(WebElement)
but providing
ability to override default color, font values.locator
- By to be highlightedhighlightColor
- element highlight colorlineWidth
- line width around the elementtext
- text to be placed above the highlighted elementtextColor
- color of the texttextFont
- text fontScreenshot
public Screenshot cover(com.assertthat.selenium_shutterbug.utils.web.Coordinates coords)
coords
- Coordinates to coverScreenshot
public Screenshot cover(com.assertthat.selenium_shutterbug.utils.web.Coordinates coords, Color color)
coords
- Coordinates to covercolor
- color to useScreenshot
public Screenshot cover(org.openqa.selenium.By locator)
locator
- By to coverScreenshot
public Screenshot cover(org.openqa.selenium.WebElement element)
element
- WebElement to coverScreenshot
public Screenshot cover(org.openqa.selenium.By locator, Color color)
locator
- By to covercolor
- color to useScreenshot
public Screenshot cover(org.openqa.selenium.WebElement element, Color color)
element
- WebElement to covercolor
- color to useScreenshot
public Screenshot blur()
Screenshot
public Screenshot blur(org.openqa.selenium.By locator)
locator
- By to be blurredScreenshot
public Screenshot blur(org.openqa.selenium.WebElement element)
element
- WebElement to be blurredScreenshot
public Screenshot blurExcept(org.openqa.selenium.By locator)
locator
- By to stay not blurredScreenshot
public Screenshot blurExcept(org.openqa.selenium.WebElement element)
element
- WebElement to stay not blurredScreenshot
public Screenshot monochrome(org.openqa.selenium.By locator)
locator
- By within the page to be made 'monochrome'Screenshot
public Screenshot monochrome(org.openqa.selenium.WebElement element)
element
- WebElement within the page to be made 'monochrome'Screenshot
protected Screenshot self()
self
in class com.assertthat.selenium_shutterbug.core.Snapshot<Screenshot>
Copyright © 2019. All rights reserved.