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

nl.hsac.fitnesse.sample.TableWebsiteTest Maven / Gradle / Ivy

There is a newer version: 5.3.17
Show newest version
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