enter image description hereI want to get the text of all links within a menu and compare them to the expected texts. I am new to testcafe.
const all_GeneralDisplayTopLink = Selector('nav.shTop').find('ul').find('li');
async areGeneralDisplayedLinksPresent(){
let gettexts = all_GeneralDisplayTopLink;
var Count = await gettexts.count;
console.log(Count + " I need help");// this return four as expected
for (var i = 0; i < Count; i++){
var printText = await gettexts.nth(i).textContent;// this throwing an error.
printText++;
console.log(printText + " I need help2");