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] Possible click element logic issue in combination with detach #4856

Closed
LanderBeeuwsaert opened this issue Dec 30, 2020 · 1 comment
Closed

Comments

@LanderBeeuwsaert
Copy link

Context:

  • Playwright Version: [what Playwright version do you use?] 1.7.1
  • Operating System: [e.g. Windows, Linux or Mac] Windows
  • Node.js version: [e.g. 10.12, 10.14] 14.15.1
  • Browser: [e.g. All, Chromium, Firefox, WebKit] Chromium
  • Extra: [any specific details about your environment] is running in headless mode, angular application, slowMo is set to 1.

System:
OS: Windows 10 10.0.19041
Memory: 17.33 GB / 31.93 GB
Binaries:
Node: 14.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - C:\Lander\WS\acro-companion\node_modules.bin\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD

Code Snippet

await page.click(text=/.*gory ${category} */);

Describe the bug

see the logging out below.
How I interpret why the below issue happens is as follows:

Button X becomes clickable.
Playwright clicks the button X.
Playwright clicks another button Y that when clicked, removes button X from the DOM.
Playwright checks that the button X received the pointer event, but it has actually already been removed from the DOM.
Playwrights keeps waiting until timeout & crash

Does that make sense?

TEST log: page.click: Timeout 40000ms exceeded.
=========================== logs ===========================
waiting for selector "text=/.*gory 2 */"
selector resolved to visible Category 2
attempting click action
waiting for element to be visible, enabled and not moving
element is visible, enabled and does not move
scrolling into view if needed
done scrolling
checking that element receives pointer events at (618.65,278)
element was detached from the DOM, retrying
waiting for selector "text=/.*gory 2 */"

Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.:
at Connection.sendMessageToServer (C:\azure_agent_work\1\s\e2e-testing\playwright\node_modules\playwright\lib\client\connection.js:69:15)
at Proxy. (C:\azure_agent_work\1\s\e2e-testing\playwright\node_modules\playwright\lib\client\channelOwner.js:44:61)
at C:\azure_agent_work\1\s\e2e-testing\playwright\node_modules\playwright\lib\client\frame.js:257:40
at Frame._wrapApiCall (C:\azure_agent_work\1\s\e2e-testing\playwright\node_modules\playwright\lib\client\channelOwner.js:72:34)
at Frame.click (C:\azure_agent_work\1\s\e2e-testing\playwright\node_modules\playwright\lib\client\frame.js:256:21)
at C:\azure_agent_work\1\s\e2e-testing\playwright\node_modules\playwright\lib\client\page.js:403:60
at Page._attributeToPage (C:\azure_agent_work\1\s\e2e-testing\playwright\node_modules\playwright\lib\client\page.js:202:20)
at Page.click (C:\azure_agent_work\1\s\e2e-testing\playwright\node_modules\playwright\lib\client\page.js:403:21)
at CreateSheetTestHelper. (C:\azure_agent_work\1\s\e2e-testing\playwright\tests\infrastructure\create-sheet-test-helper.ts:99:18)
at step (C:\azure_agent_work\1\s\e2e-testing\playwright\tests\infrastructure\create-sheet-test-helper.ts:33:23) {
name: 'TimeoutError'
}

@LanderBeeuwsaert
Copy link
Author

nope nope, closing, it's an issue in our code

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

1 participant