Skip to content

[BUG] Page.click throws "Node is either not visible or not an HTMLElement" if element animates from outside the viewport #2276

@dialupdev

Description

@dialupdev

Context:

  • Playwright Version: 1.0.1
  • Operating System: macOS
  • Node version: 12.16.3
  • Browser: Chromium

Describe the bug

Hey team. I'm seeing some flakiness in my tests and I'm having a hard time pinning it down with a repro. This only happens around 5% of the time, and the code isn't changing in between test runs, so it's been difficult to find a way to debug. I don't see anything strange about the element. It does animate in from outside the viewport though, so that's something.

Here's the LOC that's throwing:

throw new Error('Node is either not visible or not an HTMLElement');

I read through the method source, but it's bit hard for me to parse exactly what's going on. The selector I'm using is definitely referring to an HTML element, so maybe the problem is that it's not visible. I'm trying to understand why this method would throw if the element isn't visible though. Shouldn't Playwright wait for up to 30s for the element to become visible?

I'm going to try to create a repro, but it would help to have a bit of context before diving in.

Thanks for taking a look!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions