Your first test script should open a browser, load a site, and check if something is on the page. This helps verify that your setup works and gives you a base for future scripts.

Here’s a simple test using Selenium in Python:

from selenium import webdriver
browser = webdriver.Chrome()
browser.get('https://example.com')
assert "Example Domain" in browser.title
browser.quit()

This script does a few things:

Starts a Chrome browser.

Opens the URL.

Checks the title.

Closes the browser.

If the title check fails, the script will raise an error. From here, you can add more: find buttons, fill fields, click links.

Test scripts often follow a pattern: setup, action, verification, and cleanup. Keep your first tests simple. Focus on stability. Later, you can break them into reusable parts.

Writing your first test helps you see how everything connects. Once you’ve done this, automation becomes easier to expand.