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

[REGRESSION]: locator.click never resolves on firefox #21995

Closed
ritz078 opened this issue Mar 27, 2023 · 1 comment · Fixed by #22327
Closed

[REGRESSION]: locator.click never resolves on firefox #21995

ritz078 opened this issue Mar 27, 2023 · 1 comment · Fixed by #22327

Comments

@ritz078
Copy link

ritz078 commented Mar 27, 2023

Context:

  • GOOD Playwright Version: 1.30.0
  • BAD Playwright Version: 1.31.2 (This also exists on 1.32.1)
  • Operating System: Mac
  • Extra: [any specific details about your environment]

Code Snippet

import { test } from '@playwright/test';

test('Firefox issue', async ({ page }) => {
  await page.goto('https://web-examples.pspdfkit.com/hello?mode=standalone');
  const frame = page.mainFrame().childFrames()[0]
  await frame.click('.PSPDFKit-Toolbar-Button-Annotate')
  await frame.click("[title='Text']")
  const canvasLocator = frame.locator(`.PSPDFKit-Page[data-page-index="0"][data-page-is-loaded="true"]`).locator('.PSPDFKit-Text-Canvas')
  await canvasLocator.waitFor()

  // This never resolves for firefox
  await canvasLocator.click({
    position: { x: 50, y: 50 },
  })
});

Describe the bug

The above test passes 100% on all browsers except firefox. It worked fine on firefox in 1.30.0. I get the following wrror in recent versions:

Running 1 test using 1 worker
  1) [firefox] › example.spec.ts:3:5 › Firefox issue ───────────────────────────────────────────────

    Test timeout of 30000ms exceeded.

    locator.click: Target closed
    =========================== logs ===========================
    waiting for locator('.PSPDFKit-Page[data-page-index="0"][data-page-is-loaded="true"]').locator('.PSPDFKit-Text-Canvas')
      locator resolved to <div class="PSPDFKit-4dwy35ce5zzs8fcuzm4z5qyj9j PSPDF…></div>
    attempting click action
      waiting for element to be visible, enabled and stable
      element is visible, enabled and stable
      scrolling into view if needed
      done scrolling
      performing click action
    ============================================================

      10 |
      11 |   // This never resolves for firefox
    > 12 |   await canvasLocator.click({
         |                       ^
      13 |     position: { x: 50, y: 50 },
      14 |   })
      15 | });

        at /Users/ritz078/projects/playwright-repro/tests/example.spec.ts:12:23

    Pending operations:
      - locator.click at tests/example.spec.ts:12:23
@mirao
Copy link

mirao commented Mar 27, 2023

It could be related to issues reported in #20993.

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