
org.fluentlenium.assertj.custom.ElementAttributeAssert Maven / Gradle / Ivy
package org.fluentlenium.assertj.custom;
import org.assertj.core.api.AbstractStringAssert;
/**
* Assertion interface for element attribute validation.
*/
public interface ElementAttributeAssert extends AttributeAssert {
/**
* Checks if the element has the given property.
*
* It allows users to do not just presence validation but apply chained String assertions
* to further validate the attribute value.
*
* Examples:
*
* Validating the presence of an attribute on an element:
*
* assertThat(element).hasAttribute("href");
*
*
* Validating both the presence of an attribute on an element, and the value of that attribute:
*
* assertThat(element).hasAttribute("href").isEqualTo("https://duckduckgo.com");
*
*
* @param attribute the attribute to find
* @return a new {@code AbstractStringAssert} object with the actual attribute value
*/
AbstractStringAssert hasAttribute(String attribute);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy