Home / Companies / Octopus Deploy / Blog / Post Details
Content Deep Dive

Selenium series: A sample web page

Blog post from Octopus Deploy

Post Details
Company
Date Published
Author
Matthew Casperson
Word Count
3,352
Language
English
Hacker News Points
-
Summary

Matthew Casperson's post from October 2, 2018, explores the development of a Selenium WebDriver test framework, specifically focusing on interacting with a simple web page containing various HTML elements. The article outlines the process of creating a web page with form elements like buttons, text boxes, radio buttons, checkboxes, and select elements, all designed to trigger JavaScript functions that display messages upon interaction. Casperson explains how to save the HTML page in a Maven project directory and how to set up automated browser tests using Java and the WebDriver. He provides a detailed walkthrough of writing a test method that opens and interacts with the web page using WebDriver, including clicking elements, populating text fields, and selecting options, and verifies these interactions by checking the displayed messages. The post emphasizes building a test framework by implementing methods to interact with web elements and verifying the outcomes using assertions, illustrating the core principles of writing WebDriver tests.