nl.hsac.fitnesse.fixture.util.selenium.by.PlaceholderBy 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;
/**
* Finds elements by their placeholder.
*/
public class PlaceholderBy {
/**
* @param text exact placeholder value.
* @return by returning input or textarea with requested text as placeholder.
*/
public static By exact(String text) {
return new CssBy("input[placeholder='%1$s'],textarea[placeholder='%1$s']", text);
}
/**
* @param text partial placeholder value.
* @return by returning input or textarea whose placeholder contains the requested text.
*/
public static By partial(String text) {
return new CssBy("input[placeholder*='%1$s'],textarea[placeholder*='%1$s']", text);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy