Selenium WorkBook #32: Quick Search Clients (Live Search)

Review of waits and extract to function refactoring

Courtney Zhan
3 min readMar 24, 2024

--

This article is one of the “Selenium Training Workbook” series, a set of bite-sized exercises. While each exercise is independent, it may require knowledge and practices covered in previous episodes.

Learning Objectives

  • Test Data Preparation
  • Search-as-you-type text search and select a result
  • Review: Waiting
  • Review: Extract to Function refactoring

Test Design

As for any searching related automated tests, the first thought to QA engineers is test data preparation. For example, WhenWise live search supports several modes:

  • By first name, e.g. “James” for full name “James Bond”
  • By last name, e.g. “Bond”
  • By initials, e.g. “J B”

Also need to consider “No matches”, “Single result” and “Multiple results”. In summary, you need to consider the above before writing automated test scripts.

A quick recap of the two common ways to prepare test data in automated test scripts:

  • Using seeded data

--

--