I am facing an issue where clicking on the Span Element within a Grid cell is not working. I have tried using actions and the code below, but neither worked for me. Any advice would be greatly appreciated.
async SaveorCancelRow() {
var table = this.component;
var tbody = table.element(by.xpath(".//tbody"));
var trs = tbody.all(by.tagName("tr")).get(1);
//Click Save tr[@class='SearchResultItemView customGridHighlight']//td[3]
await trs
.element(by.xpath('.//td[3]//span[contains(@class, "save")]'))
.click()
.then(function() {
browser.sleep(5000);
});
}
}