Rayrun
← Back to Discord Forum

Fixture - tests fail if I use await use(page) but not without await

In the below code, my tests fail if I do await use(page) but the pass if I do not use the wait. Why is this?

firstPageToReconcileUrl: async ({ page }, use) => {
        await injectOktaToken(page);
        await setClientsApiMock(page);
        await setReconcileApiMock(page);
        await page.goto('/reconcile?foo=ws.pg');
        use(page);
      }

This thread is trying to answer question "Why do tests fail when using 'await use(page)' but pass without 'await'?"

1 reply

nevermind, they are passing now with await. My error.

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].