How to execute await in console when using puppeteer ndb?

27 Views Asked by At

I am running ndb to debug my puppeteer scripts. When I put a breakpoint and use console to make some evaluation on selection such as:

h1 = await page.$eval("h1", el => el.innerText);

I got as result an Promise

enter image description here

How can I retrieve the result ?

I tried:

await page.$eval("h1", el => el.innerText).then((response) => {
         console.log(response);
    });

with no success : got a Promise as well

0

There are 0 best solutions below