Selenium WebDriver 4

Read a CSS property value

Medium70 pts~25 min
  • CSS values
  • Visual state
Practice app · Profile Settings

A settings page for clicking, typing, reading text/attributes/CSS and element state.

Test URL
/lab/selenium-read-a-css-property-value

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Verify styling by reading a computed CSS property.

Your task

  1. 1Open TEST_URL.
  2. 2Read the computed color of #status-badge.
  3. 3Assert it represents rgb(10, 118, 83).
  4. 4Assert the badge text is “Active”.

Acceptance criteria

  • getCssValue is used
  • #status-badge is visible
  • At least 2 assertions pass

Selenium WebDriver 4 · Selenium · Interactions