The Agile Way — Practical Automated E2E Testing

The Agile Way — Practical Automated E2E Testing

Selenium Training Workbook

#39: Change Available Time Slots (Selenium Advanced User Interactions)

Drag the time slider using Selenium’s Advanced User Interactions API.

Courtney Zhan's avatar
Courtney Zhan
May 22, 2024
∙ Paid

Learning Objectives

Introduce Selenium’s Advanced User Interactions (AUI) API.

So far we have been performing simple user operations such as clicking a button (mouse) and entering text (keyboard). How about more complex ones, such as drag-n-drop? We can do that with Selenium’s Advanced User Interactions.

Knowledge Point: Selenium Advanced User Interactions

While there is the word ‘advanced’ in Selenium’s AUI, its syntax is still quite simple:

driver.action. + one or more above operations + .perform

Mouse operations:

  • click

  • click_and_hold

  • context_click

  • double-click

  • drag_and_drop

  • drag_and_drop_by

  • move_by

  • move_to

  • release

Keyboard operations:

  • key_down

  • key_up

  • send_keys

In this exercise, we will just focus on one: drag_and_drop_by.

Test Design

Italicised text means we have completed them in the previous exercise.

  1. Navigate to the business booking page, which we have done many times in previous exercises.

  2. Click tomorrow’s date

  3. Assert the time slots.

  4. Drag the start time slider to narrow the start time range, no matter which direction.

  5. Click the blue tick button (above the slider) to apply

  6. Assert the available time slots again, shall be less.

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

Tasks

Task 1: Drag the start time slider

User's avatar

Continue reading this post for free, courtesy of Zhimin Zhan.

Or purchase a paid subscription.
© 2026 Zhimin Zhan · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture