com.shaft.gui.internal.locator.XpathAxis Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of SHAFT_ENGINE Show documentation
Show all versions of SHAFT_ENGINE Show documentation
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!
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;
}
}