I need to extract value that was created after running some script. My tests are written in Playwright.
So, I have a javascript that return some id from locator on page. it looks like
cy.sdk.engine.block.findBy('image')
This returns id of image. I've tested this script in devtools console and it works.
The question is, how to get this value to display in Playwright test results and verify if the script executed properly.
I'm trying this code:
await page.evaluate(()=> cy.sdk.engine.block.findBy('image'));
Playwright executes it but I don't see value that was created after executing script.