org.fluentlenium.assertj.custom.ElementAttributeAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluentlenium-assertj Show documentation
Show all versions of fluentlenium-assertj Show documentation
AssertJ Extension for FluentLenium
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);
}