Selenium WebDriver 4

Send and withdraw a connection invitation

Easy30 pts
  • 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”.

Validation Checks

  • 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)

Cloud Execution & Grading Guide

This Easy Selenium Challenges exercise runs inside TargetQA's managed cloud sandbox using Selenium WebDriver 4 (Java, Python, C#). Every submission runs inside an isolated headless Chromium container with pre-synced drivers, capturing live console logs, DOM assertions, and a 720p step-by-step video replay.

  • Supported stacks: Java (Selenium 4 + JUnit 5) · Python (Selenium 4 + pytest) · C# (Selenium 4 + NUnit)
  • Zero local setup: Use the pre-declared TEST_URL variable so your script targets the live ConnectIn sandbox reliably without hardcoding hosts.
  • Automated grading: Click Run to inspect step logs and behavior, then click Submit to validate all 4 acceptance checks and earn 30 points.

Selenium WebDriver 4 · Selenium Challenges Practice Track · ConnectIn