Skip to content

[Question]: Playwright doesn't find the right location of elements with 'zoom' css property #7642

Closed

Description

@radamihai

Your question

On a specific website playwright doesn't seem to find the location of elements accurately:

issue1

In the above image I'm hovering over the button in the browser opened by codegen. The highlighted area does not match the element position, as seen on the screen or when hovering over the element definition in the Developer Tools:
issue2

This behavior is causing some issues, with functions like elementHandle.screenshot() and page.click(). This issue happens on all elements on this page and scrolling on the page seems to affect the location determined by playwright relative to the actual location of the element. I'm looking for some insight into how this issue could be fixed or why is it occurring.

Website I'm talking about: https://factura.vodafone.ro/

Activity

  1. aslushnikov commented on Jul 15, 2021

    @aslushnikov
    Contributor

    Easily reproes for me on tip-of-tree as of Jul 15, 2021:

    npx playwright open https://factura.vodafone.ro/

    image

  2. dgozman commented on Aug 11, 2021

    @dgozman
    Collaborator

    This is due to zoom: 90% css property on the body element. It is not trivial to work around this one, unfortunately.

  3. changed the title [-][Question]: Playwright doesn't find the right location of elements on specific website[/-] [+][Question]: Playwright doesn't find the right location of elements with 'zoom' css property[/+] on Aug 11, 2021
  4. pavelfeldman commented on Jan 1, 2022

    @pavelfeldman
    Member

    Why was this issue closed?

    We are prioritizing the bugs based on the upvotes, recency and our ability to act. It looks like this issue only has a handful of upvotes, has not been touched recently and/or we lack sufficient feedback to act on it. We are closing issues like this one to keep our bug database maintainable. Please feel free to open a new issue and link this one to it if you think this is a mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions