Case Study: User Login Tests in Selenium WebDriver
A super simple automated test case that some might still get wrong.
5 min readAug 14, 2022
A repost of my daughter’s article with permission. I added a few notes. This is also included in my “How to in Selenium WebDriver” series.
Testing user login is usually the first testing task for an app. This article will go through typical user login test cases in Selenium WebDriver and highlight a common pitfall in automated testing.
Example site: Agile Travel (https://travel.agileway.net/login).
Table of Contents:
− Test Design
− Test Case 1: Login OK
− Test Case 2: Login Failed
− Oops! Failed when Running the Whole Test Script
− Analyse and Fix it
− Review by Zhimin
Test Design
For login tests, there are usually at least two test cases.
- One happy 😊 case: Login successfully
- One alternative 😞 case: Login failed from bad credentials