Welcome to the Selenium Practice Test Suite
This comprehensive test page is designed to help automation testers practice and master Selenium WebDriver with real-world UI scenarios. Below you’ll find various UI elements and components that simulate common web application features.
Each section includes test scenarios you can automate along with instructions on how to interact with the elements.
Pro Tip
Bookmark this page and use it as a reference for your automation test scripts. The page is designed to work well with all major browsers supported by Selenium.
Form Elements
Practice interacting with various form elements including text inputs, dropdowns, checkboxes, and radio buttons.
Text Input Fields
Test scenarios: Input validation, text entry, clearing fields, attribute verification.
How to Test:
- Locate elements by ID, name, or CSS selector
- Use sendKeys() to enter text
- Verify values with getAttribute(“value”)
- Test clear() functionality
Dropdowns and Select Elements
Test scenarios: Selecting options by value, index, visible text; multi-select handling.
How to Test:
- Use Select class for dropdown handling
- Test selectByVisibleText(), selectByValue(), selectByIndex()
- Verify selected options with getFirstSelectedOption()
- Test isMultiple() for multi-select dropdowns
Checkboxes and Radio Buttons
Test scenarios: Selecting/deselecting options, verifying selection state, group handling.
How to Test:
- Use click() to toggle checkboxes/radio buttons
- Verify state with isSelected()
- Test handling multiple checkboxes in a group
- Verify radio button exclusivity
Buttons and Form Submission
Test scenarios: Click actions, form submission, button state verification.
How to Test:
- Test click() on buttons
- Verify button text with getText()
- Test form submission and validation
- Verify disabled/enabled state with isEnabled()
Dynamic Elements
Practice handling elements that appear, disappear, or change based on user interactions or time delays.
Alerts and Popups
Test scenarios: Handling JavaScript alerts, confirms, prompts; modal dialogs.
How to Test:
- Use Alert interface (switchTo().alert())
- Test accept(), dismiss(), sendKeys() for prompts
- Verify alert text with getText()
- Handle modal dialogs with standard element interaction
Dynamic Content Loading
Test scenarios: Handling delayed element appearance, AJAX content loading, waiting strategies.
How to Test:
- Use explicit waits (WebDriverWait)
- Test different expected conditions (visibility, presence, etc.)
- Practice handling timeouts
- Verify dynamically loaded content
Loading content…
Show/Hide Elements
Test scenarios: Element visibility toggling, waiting for elements to appear/disappear.
How to Test:
- Test isDisplayed() for visibility checks
- Practice waiting for elements to become visible/invisible
- Handle elements that may not be present in DOM
Navigation and Links
Practice testing navigation elements, links, and browser interactions.
Links and Navigation
Test scenarios: Link clicking, verifying URLs, navigation handling.
How to Test:
- Test click() on links
- Verify current URL with getCurrentUrl()
- Practice browser navigation (back, forward, refresh)
- Handle new tab/window opening
Tabs and Accordions
Test scenarios: Switching between tabs, expanding/collapsing accordion sections.
How to Test:
- Practice locating and clicking tab headers
- Verify active tab content
- Test accordion expand/collapse functionality
- Verify content visibility after interactions
Tab 1 Content
This is the content for Tab 1. Practice switching between tabs and verifying content.
Tab 2 Content
This is the content for Tab 2. Each tab has different content to verify.
- Item 1
- Item 2
- Item 3
Tab 3 Content
This is the content for Tab 3. It includes a form element for testing.
Tables and Data Grids
Practice interacting with and validating data in tables and grids.
HTML Tables
Test scenarios: Reading table data, sorting verification, row/column interaction.
How to Test:
- Locate table rows and cells
- Verify table headers and data
- Test sorting functionality
- Practice iterating through rows/columns
ID | Name | Status | Actions | |
---|---|---|---|---|
1 | John Doe | john@example.com | Active | |
2 | Jane Smith | jane@example.com | Active | |
3 | Bob Johnson | bob@example.com | Pending | |
4 | Alice Brown | alice@example.com | Inactive |
Pagination
Test scenarios: Page navigation, verifying displayed items, handling large datasets.
How to Test:
- Test clicking page numbers
- Verify items per page
- Test next/previous buttons
- Verify active page state
ID | Product | Price | Stock |
---|
Drag and Drop
Practice handling drag and drop interactions.
Basic Drag and Drop
Test scenarios: Element dragging, drop target verification, position validation.
How to Test:
- Use Actions class for drag and drop
- Test dragAndDrop() and dragAndDropBy()
- Verify element position after drop
- Test drop target highlighting
Draggable Items
Drop Zone
File Upload
Test scenarios: File selection dialog handling, upload verification, drag-and-drop upload.
How to Test:
- Use sendKeys() with file input for upload
- Verify file name after selection
- Test drag-and-drop file upload
- Verify upload completion
Drag and drop files here or click to select
Advanced UI Components
Practice with complex UI components and interactions.
Date Pickers
Test scenarios: Date selection, calendar navigation, date formatting.
How to Test:
- Test direct date input
- Interact with calendar popup
- Navigate between months/years
- Verify selected date format
Sliders and Progress Bars
Test scenarios: Value adjustment, position verification, progress tracking.
How to Test:
- Use dragAndDropBy() for sliders
- Verify slider values
- Test progress bar completion
- Verify dynamic progress updates
Tooltips and Popovers
Test scenarios: Hover interactions, tooltip content verification, dynamic positioning.
How to Test:
- Use Actions class for hover
- Verify tooltip text content
- Test tooltip visibility timing
- Verify tooltip positioning
Mouse and Keyboard Actions
Practice advanced mouse and keyboard interactions.
Mouse Actions
Test scenarios: Hover, right-click, double-click, click-and-hold.
How to Test:
- Use Actions class for advanced interactions
- Test contextClick() for right-click
- Test doubleClick()
- Test clickAndHold() and release()
- Verify action results
Keyboard Actions
Test scenarios: Key presses, key combinations, input with special keys.
How to Test:
- Use sendKeys() with special keys
- Test keyDown() and keyUp()
- Verify keyboard shortcuts
- Test modifier keys (Ctrl, Alt, Shift)
IFrames and Shadow DOM
Practice working with nested browsing contexts and shadow DOM components.
IFrames
Test scenarios: Switching between frames, locating elements within frames.
How to Test:
- Use switchTo().frame()
- Locate elements within iframes
- Switch back to default content
- Test nested iframes