#38: Verify Available Time Slots
Extract the texts from multiple same-styled button texts.
In the last exercise, we completed one automated test script for the core business scenario. Typically, after that, we will develop automated tests for alternative business workflows or checks around that. Today’s exercise is an example.
Learning Objectives
Extract the text from multiple same-styled button texts.
Review
-find_elements
- List: assertion
- List:collect
to extract another list from the original List
Test Design
Navigate to the business booking page, which we have done many times in previous exercises.
Click tomorrow’s date
Extract the available time slots, e.g. 9:00, 10:00, …, etc, and do an assertion.
(we stop here for this article, see the next article for the rest of the test steps)
Essentially, apart from the test steps from the previous exercise, there is really just one assertion step to be done here. Let’s review assertions in software testing.
Test Data (Login) :
Site URL: https://whenwise.agileway.net
Login (Customer): james@client.com
Password: test01
The business for booking: Wise Tutor, https://whenwise.agileway.net/biz/wise-tutoring
Review: Assertion in Selenium WebDriver
Tip: Do by simple steps, and step by step.
In test automation, only start to work on automated test scripts after you have a good understanding of the goal and the steps, which are quite easy, common sense really. But often, beginners bring their half-understanding and eagerness to accomplish the task, making things complex. Once that happened, got stuck and felt frustrated. This can be totally avoided: Do by simple steps.
The KISS principle: Keep it simple, Keep it stupid. In this assertion step, I will show you how I did this in tiny steps, which many beginners didn’t have the patience to do that way.
In this assertion step, think about the following:
Keep reading with a 7-day free trial
Subscribe to The Agile Way to keep reading this post and get 7 days of free access to the full post archives.