Selenium Workbook #30: Client Sorting (Find multiple elements in Table)

Get cell text in a HTML table, Find multiple elements, and List Operations.

Courtney Zhan
4 min readMar 8, 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.

In the previous episode, we did a few client searching tests. A related test will be sorting on the returned the results.

Learning Objectives

  • Get cell text in a HTML table
  • Review: Find multiple matching elements
  • List operations (in programming)
  • Assert a list
  • Review: Test data preparation

Test Design

  1. Prepare some client data
  2. Perform a search
  3. Click the sorting by email, wait a second or so, verify the client list is ordered.
    (Note: there are two sorting orders, ascending or descending)
  4. Do the same for sorting by name
    (Note: in this app, sorting by name means by last name)

Test Data (Login):

--

--