...
Create a folder "wicketPathLocatorBuilder" in your local drive with the file "user-extension.js.wicketPathLocatorBuilder" inside. Paste the following snippet in this file.
Code Block |
---|
LocatorBuilders.add('wicketpath', function(e) {
var path = '';
var current = e;
while (current != null) {
if (current.parentNode != null) {
path = this.relativeXPathFromParent(current) + path;
if (1 == current.parentNode.nodeType && // ELEMENT_NODE
current.parentNode.getAttribute("wicketpath")) {
return this.preciseXPath("//" + this.xpathHtmlElement(current.parentNode.nodeName.toLowerCase()) +
"[@wicketpath=" + this.attributeValue(current.parentNode.getAttribute('wicketpath')) + "]" +
path, e);
}
} else {
return null;
}
current = current.parentNode;
}
return null;
});
LocatorBuilders.order.unshift(LocatorBuilders.order.pop()); |
Please check https://cwiki.apache.org/confluence/display/WICKET/Selenium+Tips
...