nl.hsac.fitnesse.sample.TableWebsiteTest 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.sample;
import nl.hsac.fitnesse.fixture.slim.web.BrowserTest;
import org.openqa.selenium.WebElement;
/**
* Sample {@link BrowserTest} subclasses which defines a custom heuristic to find elements.
*/
public class TableWebsiteTest extends BrowserTest {
@Override
protected WebElement getElement(String place, String container) {
return findFirstInContainer(container, place,
() -> findByXPath("(.//td[descendant-or-self::text()[normalized(.)='%s']])[last()]/following-sibling::td[1]", place),
// use null for container since this supplier will already be executed in 'container' context
() -> super.getElement(place, null));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy