SeleniumHQ / SeleniumHQ/docker-selenium

[🐛 Bug]: Dependencies missing for CSS @media pointer support

Open
#2,356 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

R-awaiting-answer
Dominant language
Go
Stars
8.7k
Forks
2.5k
Avg merge
10h 16m
Merged PRs (30d)
20

Description

What happened?

Hello.

Suspicion is that there is missing dependency that needs to be install for Docker.
Our website is using CSS https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pointer.
Chrome browser should register pointer:fine when mouse event is sent but it uses pointer:none.

For testing I'm using WebdriverIO.

Javascript injected into page to test

        const style = document.createElement("style");
        style.id = "hoverStyff";
        style.innerText = `@media (pointer: fine) {[data-role="my-button"] {background: red !important;}}@media (pointer: coarse) {[data-role="my-button"] {background: green !important;}}@media (pointer: none) {[data-role="my-button"] {background: blue !important;}}`;        const head = document.querySelector("head");
        if (head) {
            head.appendChild(style);
        }

Expected:

Red Background would appear

@media (pointer: fine) {[data-role="my-button"] {background: red !important;}}

Actual

Blue background appears.

When executing tests against local Chrome on MacOS expected red background is displayed but in container blue.
I also tried to add Chrome start arguments:

--blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4

but it didn't help.

Command used to start Selenium Grid with Docker (or Kubernetes)
docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome:108.0
Relevant log output
-
Operating System

macOS Sonoma 14.5

Docker Selenium version (image tag)

selenium/standalone-chrome:108.0

Selenium Grid chart version (chart version)

No response

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 reproducing the WebdriverIO CSS test with selenium/standalone-chrome:108.0 using the documented Docker command, then compare its pointer results with local Chrome on macOS. Trace the container's Chrome startup configuration and dependency environment; done means the container reports pointer:fine and the test displays the red background.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, javascript
Domain
devops, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.