client
.click('xpath', '//xpath/selector', function(result) {
// do some stuff
})
.otherCommand(); .click('xpath', "//tr[@data-recordid]/td/div/span[text()='Search Text']")
.click("tr[data-recordid]:contains('Search Text')")this.api.elements("css selector", "#j-folder-menu-3>li.ui-menu-item>a", function(link_array) {
console.log(link_array.value.length)
for (var x = 0; x < link_array.value.length; x++){
this.elementIdText(link_array.value[x].ELEMENT, function(links) {
console.log(links.value);
if(links.value === "xxxfolder") {
// move the cursor on the same element and can perform click.
this.moveTo(link_array.value[x].ELEMENT, 0,0 , function () {
this.api.elementIdClick(element.ELEMENT, function (clicked) {
console.log("You clicked on element a element which satisfy your if condition.");
});
});
}
});
}
})