Selenium Workbook #31: Add New Group Lesson Service (XPath locator)

A comparison of using ‘find_elements’ and XPath locator for non-straightforward automation step.

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

  • Click a specific button or link among several with the same text
  • Review: Find multiple matching elements
  • List operations (in programming)
  • Review: XPath locator, going up to a parent node.

Test Design

  • Navigate to the services list page
  • Click the “+ NEW SERVICE” button for the “Group lesson” category
  • Fill test data to create a new service and assert a successful creation.

Test Data (Login):

Site URL: https://whenwise.agileway.net
Login: coach@biz.com
Password: test01

Tasks

Task 1. Click the “+ NEW SERVICE” button under the…

--

--