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

nl.hsac.fitnesse.fixture.util.selenium.by.AltBy Maven / Gradle / Ivy

There is a newer version: 5.3.17
Show newest version
package nl.hsac.fitnesse.fixture.util.selenium.by;

import org.openqa.selenium.By;

/**
 * Finds elements based on their alternative text.
 */
public class AltBy {
    /**
     * @param text exact alt value.
     * @return by returning element with supplied alt attribute.
     */
    public static By exact(String text) {
        return new CssBy("[alt='%s']", text);
    }

    /**
     * @param text partial alt value.
     * @return by returning element whose alt attribute contains supplied text.
     */
    public static By partial(String text) {
        return new CssBy("[alt*='%s']", text);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy