import org.junit.jupiter.api.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.Select;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;
import static org.junit.jupiter.api.Assertions.assertTrue;
class PracticeFormTest {
@Test
void automateFormAndExplicitWait(WebDriver driver) {
driver.get("https://targetqa.com/automation-practice-form");
driver.findElement(By.id("full-name")).sendKeys("Priya Sharma");
driver.findElement(By.id("email-address")).sendKeys("priya@targetqa.com");
new Select(driver.findElement(By.id("country-select"))).selectByVisibleText("India");
driver.findElement(By.id("submit-practice-form")).click();
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));
var result = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("form-result")));
assertTrue(result.getText().contains("Priya Sharma"));
}
}Selenium & Playwright Practice Form, Web Tables & Interactive Sandbox
TargetQA's free public practice website for beginners and SDETs: inspect and automate a realistic registration form, dynamic pagination web table, JavaScript alerts, 2-second explicit wait loader, drag-and-drop box, file upload, and open Shadow DOM — with ready-to-run answers in Selenium Java and Playwright.
1. Student & QA Automation Practice Form
#practice-formInspect inputs, labels, radio buttons, checkboxes, native select dropdowns, date pickers, and file uploads.
2. Dynamic & Pagination Web Table
| ID | Scenario | Framework | Points | Status |
|---|---|---|---|---|
| TC-109 | JS Alert Prompt | Selenium | 85 | Passed |
| TC-104 | Nested iFrame Form | Selenium | 95 | Flaky |
| TC-107 | File Upload Check | Selenium | 110 | Passed |
3. Alerts, Explicit Waits, Drag-and-Drop & Shadow DOM
No dialog triggered yet.
Worked Solutions for Beginners
Selenium Java & Playwright Solutions for This Practice Form
Copy either solution into your local IDE or run it instantly with zero setup in our cloud browser compilers.
import { test, expect } from '@playwright/test';
test('automate practice form, table filter, and Shadow DOM', async ({ page }) => {
await page.goto('https://targetqa.com/automation-practice-form');
// 1. Fill form with user-facing locators
await page.getByLabel('Full Name').fill('Priya Sharma');
await page.getByLabel('Email Address').fill('priya@targetqa.com');
await page.getByLabel('Country').selectOption('India');
await page.getByRole('button', { name: 'Submit Practice Form' }).click();
await expect(page.getByTestId('form-result')).toContainText('Priya Sharma');
// 2. Pierce open Shadow DOM automatically
await page.locator('#shadow-host #shadow-input').fill('Playwright Shadow');
await page.locator('#shadow-host #shadow-btn').click();
await expect(page.locator('#shadow-host #shadow-status')).toContainText('Playwright Shadow');
});FAQ
Automation practice form FAQ
Can I use this Selenium & Playwright practice form for free without logging in?
Yes. This automation practice form, pagination web table, JavaScript alerts box, dynamic wait loader, drag-and-drop area, file upload control, and open Shadow DOM component are 100% free and publicly inspectable with no login required.
Which Selenium and Playwright locators work on this practice page?
Every element includes semantic labels, ARIA roles, stable IDs (#full-name, #email-address, #country-select, #practice-web-table), and data-testid attributes so you can practice By.id, CSS selectors, XPath, getByRole, getByLabel, getByText, and getByTestId.
Can I run Selenium or Playwright code against this practice form in my browser?
Yes. Open the TargetQA Selenium Online Compiler or Playwright Online Compiler, navigate straight to https://targetqa.com/automation-practice-form, and execute your Java, Python, TypeScript, or C# script in cloud Chromium with video replay.
Does this page include worked answers for beginners?
Yes. Complete copy-pasteable starter solutions in Selenium Java (JUnit 5) and Playwright TypeScript/Python are included right below the sandbox, plus 220+ graded exercises across 10 mock applications.