Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page.evaluate: ReferenceError: _webVitals is not defined in Playwright #336

Closed
MehseinJohan opened this issue Mar 29, 2023 · 1 comment
Closed

Comments

@MehseinJohan
Copy link

MehseinJohan commented Mar 29, 2023

Hello team,

I've installed the framework in my playwright regression.
Though, when trying to play my script :

test('screenshot_testing', async ({ cWelcomePage, page, webActions, baseURL, browserName }) => {
//Display Home page
await WelcomePage.isPageSuccessfullyDisplayed()
  page.evaluate(() => onCLS(console.log))
});

I get rejected with -:

page.evaluate: ReferenceError: _webVitals is not defined
    at eval (eval at evaluate (:197:30), <anonymous>:1:22)
    at UtilityScript.evaluate (<anonymous>:199:17)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
    at tests\regression_testing\platform\homepage\page-display.ts:22:8

Could you please help ?

Thank you in advance,

Regards,

Johan

@tunetheweb
Copy link
Member

I'm afraid I don't know Playwright so can't comment on the code. A previous issue showed some code that might be helpful: #180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants