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

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

Courtney Zhan

--

This article is one of the “Web Test Automation Workbook” series, a set of bite-sized exercises (typically 15–20 mins). A practical and satisfying way to learn web test automation with Selenium WebDriver.

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

--

--

No responses yet