public interface WebElementHaveExpectations
WebElement.
About the ibello expectation engine, see hu.ibello.expect.
| Modifier and Type | Method and Description |
|---|---|
void |
attribute(String name)
An expectation which comes true when the element has attribute with the given name.
|
void |
attributeWithValue(String name,
Pattern pattern)
An expectation which comes true when the element has attribute with the given name and
it's value matches the given regular expression.
|
void |
attributeWithValue(String name,
String value)
An expectation which comes true when the element has attribute with the given name and value.
|
void |
cssClassName(String className)
An expectation which comes true when the element has a CSS class with the given name.
|
void |
cssValue(String propertyName,
Pattern pattern)
An expectation which comes true when the element's CSS property matches the given
regular expression.
|
void |
cssValue(String propertyName,
String value)
An expectation which comes true when the element's CSS property has the given value.
|
void |
fileName(Pattern pattern)
An expectation which comes true when the element is a file input and it's value
is a file with name matching the given regular expression.
|
void |
fileName(String value)
An expectation which comes true when the element is a file input and it's value
is a file with the given name.
|
void |
id(String id)
An expectation which comes true when the element's
id attribute
is the given one. |
void |
selectedOption(Pattern pattern)
An expectation which comes true when the element is a dropdown list and the text of the
currently selected option matches the given regular expression.
|
void |
selectedOption(String text)
An expectation which comes true when the element is a dropdown list and the text of the
currently selected option is the given one.
|
void |
tagName(String tagName)
An expectation which comes true when the element's tag name is the given one.
|
void |
text(Pattern pattern)
An expectation which comes true when the element's text matches the given
regular expression.
|
void |
text(String value)
An expectation which comes true when the element's text is the given one.
|
void |
textOrValue(Pattern pattern)
An expectation which comes true when the element's text or
value attribute matches the given
regular expression. |
void |
textOrValue(String value)
An expectation which comes true when the element's text or
value attribute is the given one. |
void |
value(Pattern pattern)
An expectation which comes true when the element's
value attribute
matches the given pattern. |
void |
value(String value)
An expectation which comes true when the element's
value attribute
is the given one. |
void id(String id)
id attribute
is the given one. If this not occurs during the timeout, an exception will be thrown,
all information will be logged and the current test will fail.
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the id is the given one.
id - a value to checkvoid value(String value)
value attribute
is the given one. If this not occurs during the timeout, an exception will be thrown,
all information will be logged and the current test will fail.
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the value is the given one.
value - a value to checkvoid value(Pattern pattern)
value attribute
matches the given pattern. If this not occurs during the timeout, an exception will be thrown,
all information will be logged and the current test will fail.
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the value matches
the regular expression.
pattern - a regular expressionvoid fileName(String value)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the file name is the given one.
value - the file name to checkvoid fileName(Pattern pattern)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the file name matches
the regular expression.
pattern - a regular expressionvoid attribute(String name)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the attribute exists.
name - name of attributevoid attributeWithValue(String name, String value)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the attribute's value is the given one.
name - name of attributevalue - value of attributevoid attributeWithValue(String name, Pattern pattern)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the attribute's value
matches the regular expression.
name - name of attributepattern - a regular expression about the attribute's valuevoid tagName(String tagName)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the tag name is the given one.
tagName - tag name to checkvoid cssClassName(String className)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the CSS class is present
on the element.
className - CSS class namevoid cssValue(String propertyName, String value)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the CSS value is the given one.
propertyName - CSS property namevalue - CSS property valuevoid cssValue(String propertyName, Pattern pattern)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the CSS value matches
the regular expression.
propertyName - CSS property namepattern - a regular expression for CSS property valuevoid text(String value)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the text is the given one.
value - text value to checkvoid text(Pattern pattern)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the text matches
the regular expression.
pattern - a regular expressionvoid textOrValue(String value)
value attribute is the given one.
If this not occurs during the timeout, an exception will be thrown,
all information will be logged and the current test will fail.
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the text is the given one.
value - text value to checkvoid textOrValue(Pattern pattern)
value attribute matches the given
regular expression.
If this not occurs during the timeout, an exception will be thrown,
all information will be logged and the current test will fail.
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the text matches
the regular expression.
pattern - a regular expressionvoid selectedOption(String text)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the text is the given one.
text - text value to checkvoid selectedOption(Pattern pattern)
If the method was called after WebElementExpectationBuilder.toNotHave(),
then the outcome of the expectation is the opposite: it will fail if the text matches
the regular expression.
pattern - a regular expressionCreated by Kornél Simon, 2022