w3c / w3c/webdriver

Recognise browsers device ratio when getting element rect

Open
#1,729 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

It seems like getting the element rect doesn't recognise the browsers device ratio when running tests in a mobile browser, e.g. given on a browser I am able to target the center of an image:

image

The same procedure fails when running in a mobile browser:

image

I can provide a better example using Puppeteer but before I do that I would like to know if this would be something the spec authors would consider adding to the spec.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the WebDriver specification's element-rect behavior and reviewing the mobile-browser examples in this issue. Determine whether device ratio should be incorporated into the specification; done means a clear decision and, if accepted, a precise specification change.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.