Hi guys .
as a previous Chromy user , i had the option to evaluate a function in the window context (p.s the current opened page instance) then chaining the result from the window context into the chromy context in order to get the value and pass it along.
chromy.goto(url).wait(predicate).evaluate(()=>{window.SomeFunction()}.results((someFunctionReturnedValue)=>{console.log(someFunctionReturnedValue)}
is there any chance you guys know which function in Puppeteer is the equivalent "results" function?
thanks in advance!
The return value of page.evaluate is just that.
const someFunctionReturnedValue = await page.evaluate(() => {
return window.SomeFunction();
});
console.log(someFunctionReturnedValue);
or succinct:
console.log(await page.evaluate(() => window.SomeFunction()));
Most helpful comment
The return value of
page.evaluateis just that.or succinct: