| Package | Description |
|---|---|
| com.github.loyada.jdollarx |
main package for defining Path DOM elements and browser interaction
|
| com.github.loyada.jdollarx.custommatchers |
Custom Hamcrest matchers for assertions in tests - supports multiple instances of browsers, as
well as assertions on a W3C Document
|
| Modifier and Type | Method and Description |
|---|---|
static void |
Images.assertCanvasImageIsEqualToExpected(InBrowser browser,
Path el,
InputStream expectedImageInput)
Verify that the element's image is pixel-perfect
|
static void |
Images.assertHTMLImgSoureIsEqualToExpected(InBrowser browser,
Path el,
InputStream expectedImageInput)
Verify that an image downloaded from an HTML img src attribute, is pixel-perfect
|
static void |
Images.assertImageIsEqualToExpected(InBrowser browser,
Path el,
InputStream expectedImageInput)
Verify that the element's image is pixel-perfect
|
static void |
Images.assertImageIsEqualToExpectedWithShiftAndCrop(InBrowser browser,
Path el,
InputStream expectedImageInput,
int maxShift)
Verify that the element's image is pixel-perfect, but allowing some crop/shift
|
static void |
Images.assertImageIsSimilarToExpected(InBrowser browser,
Path el,
InputStream expectedImageInput,
int maxBadPixelsRatio)
Verify the picture is "similar" to the reference image.
|
static BufferedImage |
Images.captureCanvas(InBrowser browser,
Path canvas) |
static void |
Images.captureCanvasToFile(InBrowser browser,
Path el,
File outputFile)
Save an HTML5 canvas to file.
|
static void |
Images.captureImgSrcToFile(InBrowser browser,
Path imgEl,
File outputFile)
Save the source of an HTML img element to file
|
static void |
Images.captureToFile(InBrowser browser,
Path el,
File outputFile)
Save image to file
|
static Optional<BufferedImage> |
Images.getErrorsImage(InBrowser browser,
Path el,
InputStream expectedImageInput)
create and return an image that highlights the different pixels between the captured image and the reference image
|
static void |
Images.show(InBrowser browser,
Path el)
Display image of an element in a separate window.
|
static void |
Images.showCanvas(InBrowser browser,
Path el)
Display image of an HTML5 canvas element in a separate window.
|
| Constructor and Description |
|---|
Obscure(InBrowser browser,
List<Path> elements) |
Obscure(InBrowser browser,
List<Path> elements,
boolean strict) |
Obscure(InBrowser browser,
Path element) |
| Modifier and Type | Method and Description |
|---|---|
static org.hamcrest.Matcher<InBrowser> |
CustomMatchers.hasElement(Path el)
Successful if the browser has an element that corresponds to the given path.
|
static org.hamcrest.Matcher<InBrowser> |
CustomMatchers.hasNoElement(Path el)
Successful if given browser has no elements that correspond to the given path.
|
org.hamcrest.Matcher<InBrowser> |
HasElementNTimes.times()
matches the exact number given
|
org.hamcrest.Matcher<InBrowser> |
HasElementNTimes.timesOrLess()
matches the number given, or less
|
org.hamcrest.Matcher<InBrowser> |
HasElementNTimes.timesOrMore()
matches the number given, or more
|
| Modifier and Type | Method and Description |
|---|---|
org.hamcrest.Matcher<Path> |
HasText.in(InBrowser browser) |
org.hamcrest.Matcher<Path> |
IsPresent.in(InBrowser browser) |
static org.hamcrest.Matcher<Path> |
CustomMatchers.isAbsentFrom(InBrowser browser)
Successful if given browser has no elements that correspond to the given path.
|
static org.hamcrest.Matcher<Path> |
CustomMatchers.isDisplayedIn(InBrowser browser)
Successful if given element is present and displayed in the browser.
|
static org.hamcrest.Matcher<Path> |
CustomMatchers.isEnabledIn(InBrowser browser)
Successful if given element is present and enabled in the browser.
|
static org.hamcrest.Matcher<Path> |
CustomMatchers.isNotDisplayedIn(InBrowser browser)
Successful if given element is either not present, or present and not displayed in the browser.
|
static org.hamcrest.Matcher<Path> |
CustomMatchers.isPresentIn(InBrowser browser)
Successful if given element is present in the browser.
|
static org.hamcrest.Matcher<Path> |
CustomMatchers.isSelectedIn(InBrowser browser)
Successful if given element is present and selected in the browser.
|
org.hamcrest.Matcher<Path> |
IsPresentNTimes.timesIn(InBrowser browser) |
org.hamcrest.Matcher<Path> |
IsPresentNTimes.timesOrLessIn(InBrowser browser) |
org.hamcrest.Matcher<Path> |
IsPresentNTimes.timesOrMoreIn(InBrowser browser) |
| Constructor and Description |
|---|
NTimesMatcher(int nTimes,
RelationOperator relationOperator,
InBrowser browser) |
Copyright © 2019. All rights reserved.