Selenium WebDriver 4

Send and withdraw a connection invitation

Easy30 pts~2 min
  • Navigation
  • URL assertions
  • State changes
  • Confirmation dialogs
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-connect-withdraw

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

Objective

Navigate from My Network to Priya Nair's profile, send her a connection invitation, then withdraw it and verify the profile is back to its Connect state.

Your task

  1. 1Open TEST_URL (you are already signed in) and click My Network (#nav-network).
  2. 2In “People you may know”, click Priya Nair's name (.person-name inside [data-testid="person-card"][data-person-id="priya-nair"]).
  3. 3Assert the URL contains #/in/priya-nair and #profile-name reads Priya Nair.
  4. 4Click #connect-button and assert it now reads “Pending” and #connection-status says the invitation was sent.
  5. 5Click Withdraw (#withdraw-button) and confirm with #confirm-withdraw in the #withdraw-modal dialog.
  6. 6Assert #connect-button reads “Connect” again, #withdraw-button is gone and #connection-status says “Invitation to Priya Nair withdrawn”.

Acceptance criteria

  • The browser is on Priya Nair's profile.
  • The invitation was withdrawn and the Connect button is back.
  • The confirmation dialog is closed.
  • 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