[BUG] `click()` or `dblclick()` is not executing on 'path' tag for the DOM
See original GitHub issueContext:
- Playwright Version: 1.23.0
- Operating System: Linux
- Node.js version: 14.17.3
- Browser: [e.g. All, Chromium, Firefox, WebKit]
- Extra: electron application
- Electron version: 18.0.1 also tested in 13.6.6
System:
- OS: Linux 5.14 Ubuntu 20.04.4 LTS (Focal Fossa)
- Memory: 1.05 GB / 15.38 GB
- Container: Yes
Binaries:
- Node: 14.17.3 - /usr/local/lib/nodejs/node-v14.17.3-linux-x64/bin/node
- npm: 6.14.13 - /usr/local/lib/nodejs/node-v14.17.3-linux-x64/bin/npm
Languages:
- Bash: 5.0.17 - /usr/bin/bash
Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and that we can run and debug locally. For example:
Here is the complete repo to reproduce the bug: https://github.com/RizwanMR/angular-electron
Describe the bug Steps to reproduce:
- clone the repo.
- do npm i
- run the script ‘npm run e2e’
Expected result: Should click the element inside the playwright test(‘Click link’)
Actual Result: Throws error as below for the path tag locator.click: Timeout 30000ms exceeded. =========================== logs =========================== waiting for selector “(//*[contains(@class,‘path-elm’)])[1]” selector resolved to hidden <path class=“path-elm” _ngcontent-dbt-c4=“” d="M 55 30…></path> attempting click action waiting for element to be visible, enabled and stable element is not visible - waiting… ============================================================
61 | test('Click link', async () => {
62 | const elem = firstWindow.locator(`(//*[contains(@class,'path-elm')])[1]`);
> 63 | const text = await elem.click();
| ^
64 | expect(true).toBe(true);
65 | });
66 |
at /home/hi/Documents/angular-electron/e2e/main.spec.ts:63:29
at /home/hi/Documents/angular-electron/node_modules/@playwright/test/lib/workerRunner.js:388:15
Add any other details about the problem here.
Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:11 (6 by maintainers)
It worked, but expecting it to click the element as it is visible on the page, and forcing the element click will bypass so many checks on the element.
Just a suggestion, if you are using
@Playwright/Test
, you can remove theplaywright
package/library. All import statements are present in@Playwright/Test
as you can see below: