question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: jestPlaywright.resetBrowser is not a function

See original GitHub issue

I am trying to close and reopen the browser for each test(it) inside a describe.

This is my beforeEach

 beforeEach(async () => {
    await jestPlaywright.resetBrowser();
  });

and inside each test(it), I have a page.goto(url) but I get this is below error.

TypeError: jestPlaywright.resetBrowser is not a function

      11 | 
      12 |   beforeEach(async () => {
    > 13 |     await jestPlaywright.resetBrowser();
         |                          ^
      14 |   });

I have tried jestPlaywright.resetPage() and jestPlaywright.resetContext() as well, but still the same issue. Could guys let me know if I am missing something?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
NareshMurthycommented, Aug 27, 2020

Thanks! @mxschmitt @mmarkelov , Works after upgrading to latest versions. my bad, should have read the docs!

0reactions
mmarkelovcommented, Aug 27, 2020

@NareshMurthy this helpers functions were added in 1.2.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not Able to Use jest-playwright-preset in Playwright Docker ...
The jest-playwright-preset package, when used in a playwright docker container, leads to TypeError: Class extends value #<Object> is not a constructor or ...
Read more >
Using Jest with Playwright
In this blog post, we'll compare two Jest setups for creating and running end-to-end tests with Playwright.
Read more >
PlayWright - TypeError: browser.newPage is not a function
When ever I am trying to run the code I am getting error "TypeError: browser.newPage is not a function". Here is my code...
Read more >
Testing with Playwright - CodeceptJS
Playwright is a Node library to automate the Chromium (opens new window), WebKit (opens new window) and Firefox (opens new window) browsers as ......
Read more >
Authentication | Playwright - CukeTest
Playwright can be used to automate scenarios that require authentication. ... we will reuse existing authentication state in new browser contexts.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found