w3c / w3c/webdriver

Inconsistent RGB vs RGBA return value

Open
#1,447 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Get Element CSS Value needs-discussion
Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

Guys, I'm getting the following in my selenium test:

expected: <rgb(255, 0, 0)> but was: <rgba(255, 0, 0, 1)>

The issue is that I get different result when our tests is executed on our CI or locally. In both cases our app is running in a docker container and the browser and selenium "proxy" is also running in a docker container so that should be the same. What is different is the test itself (ie the selenium client side): locally it's running directly on the OS (macosx for me) and on the CI it's running inside a docker container (debian).

Locally I get rgb(255, 0, 0) and in the CI we get rgba(255, 0, 0, 1).

Note: we use WebElement#getCSSValue() to return the value.

Any idea? Thanks

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

Begin at the mentioned WebElement#getCSSValue() entry point and reproduce the color lookup in the local macOS and Debian CI Selenium-client environments. Compare the returned values and execution environments; the issue is resolved when the RGB/RGBA behavior is defined and the result is consistent or documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
testing-qa, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.