← Back to Discord Forum

Playwright newbie - timeout

testninja77posted in #help-playwright
Open in Discord

Hi, Complete Playwright newbie with hopefully a newbie question. I'm converting a test from Cypress to Playwright (yay) and on running the test I am getting timeout issues.

Mostly Locator.click: Test timeout of 30000ms exceeded

I'm struggling to figure out if it's a case of extending the timeout or the way I'm constructing the step. "await page.locator([item I'm selecting]).getByText([text for item]).first().click();"

Any help would be great please. Many thanks.

This thread is trying to answer question "Is the timeout issue caused by needing to extend the timeout, or is there a problem with how the step is constructed in Playwright?"

4 replies

Hard to suggest anything without looking at the code or trace.

Would this help

Test timeout of 30000ms exceeded.

Error: locator.click: Test timeout of 30000ms exceeded.
Call log:
  - waiting for locator([item I'm selecting]).getByText([text for item]).first()

  82 |         await page.locator([item I'm selecting]).nth(7).click();
  83 |         await expect(page.locator('h2')).toHaveText([text for item]);

84 | await page.locator([item I'm selecting]).getByText([text for item]).first().click();

waiting for locator([item I'm selecting]).getByText([text for item]).first()

maybe element did not become visible?

On playing it through the element is there to be selected. Perhaps it's looking in the wrong place.

Related Discord Threads

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 luc@ray.run.