
nl.hsac.fitnesse.fixture.util.selenium.by.TextBy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hsac-fitnesse-fixtures Show documentation
Show all versions of hsac-fitnesse-fixtures Show documentation
Fixtures to assist in testing via FitNesse
package nl.hsac.fitnesse.fixture.util.selenium.by;
import org.openqa.selenium.By;
/**
* Container for Bys searching for elements by their text content.
*/
public class TextBy {
public static By exact(String text) {
return new XPathBy(".//text()[normalized(.)='%s']/..", text);
}
public static By partial(String text) {
return new XPathBy(".//text()[contains(normalized(.),'%s')]/..", text);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy