Class AttributeWithValue
- java.lang.Object
-
- com.codeborne.selenide.Condition
-
- com.codeborne.selenide.conditions.AttributeWithValue
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringexpectedAttributeValue
-
Constructor Summary
Constructors Constructor Description AttributeWithValue(java.lang.String attributeName, java.lang.String expectedAttributeValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringactualValue(Driver driver, org.openqa.selenium.WebElement element)If element didn't match the condition, returns the actual value of element.booleanapply(Driver driver, org.openqa.selenium.WebElement element)Check if given element matches this condition.protected java.lang.StringgetAttributeValue(org.openqa.selenium.WebElement element)java.lang.StringtoString()-
Methods inherited from class com.codeborne.selenide.Condition
and, applyNull, attribute, attribute, attributeMatching, be, because, cssClass, cssValue, exactOwnText, exactText, exactTextCaseSensitive, exactValue, getName, have, href, id, match, matchesText, matchText, missingElementSatisfiesCondition, name, negate, not, or, ownText, pseudo, pseudo, selectedText, text, textCaseSensitive, type, value
-
-
-
-
Method Detail
-
apply
@CheckReturnValue public boolean apply(Driver driver, org.openqa.selenium.WebElement element)
Description copied from class:ConditionCheck if given element matches this condition.
-
actualValue
@Nonnull @CheckReturnValue public java.lang.String actualValue(Driver driver, org.openqa.selenium.WebElement element)
Description copied from class:ConditionIf element didn't match the condition, returns the actual value of element. Used in error reporting. Optional. Makes sense only if you need to add some additional important info to error message.- Overrides:
actualValuein classCondition- Parameters:
driver- given driverelement- given WebElement- Returns:
- any string that needs to be appended to error message.
-
toString
@Nonnull @CheckReturnValue public java.lang.String toString()
-
getAttributeValue
protected java.lang.String getAttributeValue(org.openqa.selenium.WebElement element)
-
-