All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fluentlenium.assertj.custom.ElementAttributeAssert Maven / Gradle / Ivy

There is a newer version: 5.0.4
Show newest version
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 - 2024 Weber Informatics LLC | Privacy Policy