Selenium WebDriver 4

Clear the unread notifications badge

Easy25 pts~2 min
  • Dropdown panels
  • Badges
  • Attribute selectors
Practice app · ConnectIn

A professional network: a 3-step sign-up wizard, a feed with likes, comments and lazy-loaded posts, a notifications dropdown, a messaging drawer with auto-replies, job search with filters and a multi-step Easy Apply modal, member profiles with connect/withdraw, a skills tag input and company pages that open a careers site in a new tab.

Test URL
/lab/selenium-connectin-notifications-badge

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

Objective

Open the notifications dropdown, verify it lists the unread notifications, mark them all as read and verify the unread badge disappears.

Your task

  1. 1Open TEST_URL (you are already signed in) and assert the badge #notifications-badge shows 3.
  2. 2Click the bell (#notifications-button) and wait for the dropdown #notifications-panel.
  3. 3Assert it lists 5 notifications ([data-testid="notification"]), 3 of them with data-unread="true".
  4. 4Click “Mark all as read” (#mark-all-read).
  5. 5Assert #notifications-status reads “You're all caught up”, no notification is unread and the badge is gone. Leave the dropdown open.

Acceptance criteria

  • The dropdown is open and says you're all caught up.
  • No notification is marked unread.
  • The unread badge is no longer shown.
  • The test makes at least two assertions.

Fixtures

Email
alex@connectin.test
Password
Connect@2026
Account name
Alex Morgan
Password rules
8+ characters with an uppercase letter, a number and a special character
Locations
Bengaluru, India · Berlin, Germany · London, UK · New York, US · Toronto, Canada
Featured company
Northwind Labs (#/company/northwind-labs)

Selenium WebDriver 4 · Selenium Challenges · ConnectIn