public abstract class MatchingElementResultHandler extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MatchingElementResultHandler.AtLeastOneElementImpl
This class will look for one matching element and disregard others.
|
static class |
MatchingElementResultHandler.ExactlyOneElementImpl
This class will check that only one matching element is found.
|
static class |
MatchingElementResultHandler.NoneFailingOneElementImpl
This class fits into the MatchingElementResultHandler pattern, but doesn't throw an exception if no element is found, that is left to calling classes.
|
static class |
MatchingElementResultHandler.NthElement
This class will look for at least n matching elements and return the
nth
|
| Modifier and Type | Field and Description |
|---|---|
static MatchingElementResultHandler.AtLeastOneElementImpl |
AtLeastOneElement |
static MatchingElementResultHandler.ExactlyOneElementImpl |
ExactlyOneElement |
static MatchingElementResultHandler.NoneFailingOneElementImpl |
NoneFailingOneElement |
| Constructor and Description |
|---|
MatchingElementResultHandler() |
| Modifier and Type | Method and Description |
|---|---|
static org.openqa.selenium.WebElement |
checkForOneMatchingElement(String msg,
List<org.openqa.selenium.WebElement> matchingElems)
Checks that a list of WebElements only contains one (not empty and not
too many).
|
org.openqa.selenium.WebElement |
processResults(WebDriverContext ctx,
org.openqa.selenium.By by,
String msg) |
public static final MatchingElementResultHandler.AtLeastOneElementImpl AtLeastOneElement
public static final MatchingElementResultHandler.ExactlyOneElementImpl ExactlyOneElement
public static final MatchingElementResultHandler.NoneFailingOneElementImpl NoneFailingOneElement
public org.openqa.selenium.WebElement processResults(WebDriverContext ctx, org.openqa.selenium.By by, String msg)
public static org.openqa.selenium.WebElement checkForOneMatchingElement(String msg, List<org.openqa.selenium.WebElement> matchingElems)
msg - the assertion messagematchingElems - the initial matching elementsCopyright © 2016 Substeps. All rights reserved.