Page MenuHomePhabricator

Node is either not visible or not an HTMLElement (flaky selenium test)
Closed, ResolvedPublic

Description

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ConfirmEdit/+/461504 (touching a python file) https://integration.wikimedia.org/ci/job/wmf-quibble-selenium-php72-docker/65929/console

19:54:06 [Chrome 73.0.3683.75 linux #0-5] Spec: /workspace/src/skins/MinervaNeue/tests/selenium/specs/references.js
19:54:06 [Chrome 73.0.3683.75 linux #0-5] Running: Chrome (v73.0.3683.75) on linux
19:54:06 [Chrome 73.0.3683.75 linux #0-5] Session ID: 9f49563b-b1d9-4e08-a16f-f440bf20c252
19:54:06 [Chrome 73.0.3683.75 linux #0-5]
19:54:06 [Chrome 73.0.3683.75 linux #0-5] Opening and closing the reference drawer
19:54:06 [Chrome 73.0.3683.75 linux #0-5]    ✓ Opening a reference
19:54:06 [Chrome 73.0.3683.75 linux #0-5]    ✖ Opening a nested reference
19:54:06 [Chrome 73.0.3683.75 linux #0-5]
19:54:06 [Chrome 73.0.3683.75 linux #0-5] 1 passing (19.5s)
19:54:06 [Chrome 73.0.3683.75 linux #0-5] 1 failing
19:54:06 [Chrome 73.0.3683.75 linux #0-5]
19:54:06 [Chrome 73.0.3683.75 linux #0-5] 1) Opening and closing the reference drawer Opening a nested reference
19:54:06 [Chrome 73.0.3683.75 linux #0-5] Node is either not visible or not an HTMLElement
19:54:06 [Chrome 73.0.3683.75 linux #0-5] Node is either not visible or not an HTMLElement
19:54:06 [Chrome 73.0.3683.75 linux #0-5]     at ElementHandle.<anonymous> (/workspace/src/skins/MinervaNeue/node_modules/puppeteer-core/lib/helper.js:116:19)
19:54:06 [Chrome 73.0.3683.75 linux #0-5]     at Promise (/workspace/src/skins/MinervaNeue/node_modules/devtools/build/commands/elementClick.js:47:26)
19:54:06 [Chrome 73.0.3683.75 linux #0-5]     at DevToolsDriver.elementClick (/workspace/src/skins/MinervaNeue/node_modules/devtools/build/commands/elementClick.js:43:10)
19:54:06 [Chrome 73.0.3683.75 linux #0-5]     at iClickOnANestedReference (/workspace/src/skins/MinervaNeue/tests/selenium/features/step_definitions/reference_steps.js:20:39)
19:54:06 [Chrome 73.0.3683.75 linux #0-5]     at Context.it (/workspace/src/skins/MinervaNeue/tests/selenium/specs/references.js:43:3)

Not exactly the same error as T263137: Element ( ".drawer" ) still not displayed after 10000ms, but similar

Event Timeline

Jdlrobson added a subscriber: Jdlrobson.

I don't think we have time to investigate this so probably best to just skip this test unless QTE have any ideas why this might occur.

Jdlrobson triaged this task as Medium priority.
Jdlrobson moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
Umherirrender added a subscriber: Umherirrender.

It still happen, even for merges on mediawiki/core - https://integration.wikimedia.org/ci/job/wmf-quibble-selenium-php72-docker/141808/console / https://gerrit.wikimedia.org/r/c/mediawiki/core/+/769135

16:29:30 [0-5] Error in "Opening and closing the reference drawer.Opening a nested reference"
16:29:32 Node is either not clickable or not an HTMLElement
16:29:32 Error: Node is either not clickable or not an HTMLElement
16:29:32     at ElementHandle.clickablePoint (/workspace/src/skins/MinervaNeue/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js:342:19)
16:29:32     at processTicksAndRejections (internal/process/task_queues.js:95:5)
16:29:32     at async ElementHandle.click (/workspace/src/skins/MinervaNeue/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js:415:26)
16:29:32     at Element.<anonymous> (/workspace/src/skins/MinervaNeue/node_modules/@wdio/utils/build/shim.js:270:24)
16:29:32     at iClickOnANestedReference (/workspace/src/skins/MinervaNeue/tests/selenium/features/step_definitions/reference_steps.js:21:39)
16:29:32     at Context.<anonymous> (/workspace/src/skins/MinervaNeue/tests/selenium/specs/references.js:43:3)
16:29:32 [0-5] FAILED in chrome - /tests/selenium/specs/references.js
Umherirrender renamed this task from Node is either not visible or not an HTMLElement to Node is either not visible or not an HTMLElement (flaky selenium test).Mar 20 2022, 3:39 PM

Change 772463 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] [Tests] Strengthen the reference drawer test

https://gerrit.wikimedia.org/r/772463

Looks like the drawer animation is still running when the attempt to click it is made (race condition).

image.png (784×1 px, 71 KB)

The above patch should hopefully give it enough time to be clickable.

Change 772463 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] [Tests] Strengthen the reference drawer test

https://gerrit.wikimedia.org/r/772463