Task Progress0 of 13 Tasks
0%

Basic Elements

Text inputs, buttons, checkboxes, radios, sliders, toggles and links. Each element shows its goal beside it, and its task ticks itself the moment your script gets it right. Read tasks have an answer box: your script types in what it read.

1.Input fields

Textbox with validationTo do
Goal

Type “ab” to trigger the error, check the message, then type “QA Tester” so the error clears.

Password rulesTo do
Goal

Trigger both password errors (too short, then no uppercase letter), then enter a valid password.

Format-checked fieldsTo do
Goal

Fill email, number, phone, URL and search with valid values so no field shows an error.

Hidden inputTo do

There is an input here. You just can't see it.

Goal

Read the value of the hidden input and type it in the answer box.

Read-only and disabled inputsTo do
Goal

Assert the first input is read-only and the second is disabled, then type the read-only value in the answer box.

Multi-line textareaTo do
Goal

Type a message of at least three lines.

2.Buttons

Button typesTo do
Goal

Click the Normal, Submit, Reset and round (+) buttons, and assert the disabled button cannot be clicked.

Loading buttonTo do
Goal

Click the loading button, wait until it is enabled again, then click it a second time.

3.Checkboxes and radios

CheckboxesTo do
Goal

Check “Single Checkbox” and “Option B”. Leave “Option A” unchecked.

Radio groupTo do
Goal

Select “No” and assert that “Yes” is not selected.

4.Sliders and toggles

Range sliderTo do
50
Goal

Set the volume slider to exactly 75.

Toggle switchTo do
Goal

Turn the switch on.

5.Links

Goal

Assert the external link opens in a new tab, then click the internal link.

About this Basic Elements page

Basic web element automation is the skill of finding form controls such as text inputs, buttons, checkboxes and radio buttons, then typing, clicking and asserting on them from a test script. You practice it on this free page by completing tasks that include positive and negative cases, then checking the result box. Solutions are given in Playwright, Selenium Java, Selenium Python and Cypress.

Screenshot of the Basic Elements practice page on QA Playground. Interact with inputs, buttons, and forms.
Basic Elements: Interact with inputs, buttons, and forms.

Frequently asked questions

How do I practice Selenium with inputs and buttons?

Open this page, pick a task, and write a script that locates the element, performs the action and asserts the outcome. A result box reports pass or fail for each task. No signup is needed, and the page runs in your browser.

How do you type into a text field in Playwright?

Use page.getByLabel('Name').fill('value') or page.locator(selector).fill('value'). The fill method clears the field and sets the text. Use pressSequentially if the app needs real keystroke events, for example for autocomplete.

How do you click a button in Selenium 4?

Find it with driver.find_element(By.ID, 'submit') in Python, or driver.findElement(By.id("submit")) in Java, then call click(). Use an explicit WebDriverWait with element_to_be_clickable first if the button may be disabled or still rendering.

What are negative test cases for a form?

Negative cases check that invalid input is rejected: empty required fields, wrong formats, text beyond a length limit, or a disabled button that must not submit. Each task here includes both positive and negative cases to automate.

Which tool is best for beginners to practice with?

Any of the four works here. Playwright and Cypress have auto-waiting, which hides timing problems, while Selenium shows them early. The page includes reference solutions in all four, so you can compare approaches.

Free developer tools on Randomly.online

QA Playground is part of Randomly.online. These tools help while you write and debug tests: