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

com.shaft.gui.internal.locator.XpathAxis Maven / Gradle / Ivy

Go to download

SHAFT is a unified test automation engine. Powered by best-in-class frameworks, SHAFT provides a wizard-like syntax to drive your automation efficiently, maximize your ROI, and minimize your learning curve. Stop reinventing the wheel. Upgrade now!

There is a newer version: 8.2.20240402
Show newest version
package com.shaft.gui.internal.locator;

public class XpathAxis {
    LocatorBuilder locatorBuilder;

    XpathAxis(LocatorBuilder locatorBuilder) {
        this.locatorBuilder = locatorBuilder;
    }

    public LocatorBuilder followingSibling(String tagName) {
        locatorBuilder.partialXpath += "//following-sibling::" + tagName;
        return locatorBuilder;
    }

    public LocatorBuilder precedingSibling(String tagName) {
        locatorBuilder.partialXpath += "//preceding-sibling::" + tagName;
        return locatorBuilder;
    }

    public LocatorBuilder ancestor(String tagName) {
        locatorBuilder.partialXpath += "//ancestor::" + tagName;
        return locatorBuilder;
    }

    public LocatorBuilder descendant(String tagName) {
        locatorBuilder.partialXpath += "//descendant::" + tagName;
        return locatorBuilder;
    }

    public LocatorBuilder following(String tagName) {
        locatorBuilder.partialXpath += "//following::" + tagName;
        return locatorBuilder;
    }

    public LocatorBuilder preceding(String tagName) {
        locatorBuilder.partialXpath += "//preceding::" + tagName;
        return locatorBuilder;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy