Trying to loop through the selector for multiple elements and getting invalid session after the first element.
await container.findElements(By.css('.sfsdff')).then((elements) => {
if (elements.length !== 0) {
elements.forEach((data) => {
data.getText().then((data1) => {
console.log(data1);
}, err => console.error(`error: ${err}`));
});
}
});
elements
has exact count that the selector meant to get from the page, its just the loop that the next elements are unable to process after first.
Thanks