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

[BUG] subtree intercepts pointer events #3905

Closed
apapkevich opened this issue Sep 16, 2020 · 6 comments
Closed

[BUG] subtree intercepts pointer events #3905

apapkevich opened this issue Sep 16, 2020 · 6 comments
Assignees

Comments

@apapkevich
Copy link

Context:

  • Playwright Version: 1.4.0
  • Operating System: Windows 10
  • Node.js version: 12.16.1
  • Browser: WebKit

Code Snippet

import {chromium, webkit, firefox} from "playwright";

(async () => {
    for (const browserType of [chromium, firefox, webkit]) {
        const browser = await browserType.launch({ headless: false });
        const context = await browser.newContext();
        const page = await context.newPage();

        await page.goto("https://github.com");
        await page.fill('input[aria-label="Search GitHub"]', "Playwright");
        await page.press('input[aria-label="Search GitHub"]', "Enter");

        await page.click(".repo-list-item:nth-child(1) a");
        await page.click('span[data-content="Security"]');
        await page.screenshot({path: `screenshots/security-${browserType.name()}.png`, fullPage: false});

        await page.close();
        await browser.close();
    }
})();

Describe the bug

This code is working fine with chromium and firefox. However, when I use Webkit it breaks on the second screen. I tried to clean install the node_modules and use Node.js v12.14.1 and v14.10.1, but it has no effect. Error logs:

Error.captureStackTrace(stackObject);
             ^
page.click: Protocol error (Runtime.awaitPromise): The page has been closed.
=========================== logs ===========================
waiting for selector ".repo-list-item:nth-child(1) a"
  selector resolved to visible <a class="v-align-middle" href="/microsoft/playwrig…>…</a>
attempting click action
  waiting for element to be visible, enabled and not moving
    element is moving - waiting...
  element is visible, enabled and does not move
  scrolling into view if needed
  done scrolling
  checking that element receives pointer events at (468,222)
  <div class="mr-3">↵            Apache-2.0 license↵          </div> from <div>…</div> subtree intercepts pointer events
retrying click action
  waiting for element to be visible, enabled and not moving
    element is moving - waiting...
  element is visible, enabled and does not move
  scrolling into view if needed
  done scrolling
  checking that element receives pointer events at (468,222)
  <div class="mr-3">↵            Apache-2.0 license↵          </div> from <div>…</div> subtree intercepts pointer events
retrying click action
@apapkevich
Copy link
Author

@yury-s
Copy link
Member

yury-s commented Sep 18, 2020

I tried the snippet on my Windows 10 machine and it passed 30 iterations in each browser just fine. I wonder what may be different between our setups.

@pavelfeldman
Copy link
Member

Same here, works for me on 1.4.1.

@apapkevich
Copy link
Author

My colleague also has no problem with this script. It seems to me that I have a problem with my laptop. What should I look at and how to try to solve it?

@dgozman
Copy link
Contributor

dgozman commented Oct 1, 2020

Sorry, no real ideas. Perhaps you have a different version of the page locally? Any proxy that intercepts stuff? Try comparing network resources as shown in Developer Tools between the broken version and the working one?

Please comment/reopen if we can help with anything else.

@dgozman dgozman closed this as completed Oct 1, 2020
@fujii
Copy link

fujii commented Oct 1, 2020

FWIW, I got a different error for your script on my env (Playwright 1.4.2/Windows 10 ver.1903).

(node:34520) UnhandledPromiseRejectionWarning: page.goto: Timeout 30000ms exceeded.

Filed in WebKit bugzilla.

Bug 217158 – [WinCairo] Never finish loading https://github.com/
https://bugs.webkit.org/show_bug.cgi?id=217158

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

5 participants