Skip to content

[BUG] unexpected value "hidden" for visible element #20862

Description

@joszo

Context:

  • Playwright Version: [1.30]
  • Operating System: [Mac]
  • Node.js version: [v18.12.1]
  • Browser: [All / Chromium]
  • Extra: [any specific details about your environment]

Describe the bug

Incorrect behaviour for visible element:

In devtools
window.getComputedStyle($('[data-tid="refresh-modal"]')).visibility -> 'visible'

but in test it is contatly failing

const modal =  page.locator('[data-tid="refresh-modal"]');
await expect(modal).toBeVisible();
      -   locator resolved to <div effect="fade/zoom" data-tid="refresh-modal" id="…>…</div>
      -   unexpected value "hidden"

Of course adding assertion for toBeHidden() + .not.toBeVisible are passing for that element.

I saw that Max mentioned in closed issues #19910 that something changed in version 1.30.

In DOM tree there is no display: none in the code.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    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