My problem is as follows. I have several links on the page, which I must follow, and then return to the same page. I tried to do it in the following way:
const els = await page.$$('div[name="olymp"] a'); // get links on the page
for (let i = 0; i < els.length; i++) {
await els[i].click(); // clicking on a link that leads to another page
await page.waitForLoadState('networkidle');
await page.click('div.floating:nth-child(1)');
await page.click('div.floating:nth-child(1) div.extra a') // a link on another page that leads to the first page
}
And i got error on second iteration:
elementHandle.click: Protocol error (DOM.describeNode): Cannot find context with specified id
Maybe someone came across a similar one?
im using Playwright v1.13