Currently, I am working on developing a test in Protractor which involves using Jasmine and TypeScript to click on each link listed within a table. The objective is to display the text of the link being clicked before proceeding. However, I have encountered an issue during this process. Whenever I attempt to utilize .getText() on the element containing all links, it outputs ManagedPromises instead of the expected text. Despite researching similar problems online for solutions, my implemented code closely resembles what was recommended. Below is the snippet of my code:
browser.findElements(By.xpath('//tBody//a')).then((clickLinks) => {
console.log('made it [' + i + ']');
console.log('link clicked[' + i + ']: ' + clickLinks[i].getText());
clickLinks[i].click();
i++;
browser.waitForAngular();
browser.driver.navigate().back();
browser.waitForAngular();
});