Dropdown Functions
This section documents dropdown functions used in the automation testing suite.
safeClickWithDelayMatSelect
-
safeClickWithDelayMatSelect(page, dropDownName, optionName, delayMs)
Opens the <mat-select> by label and picks the desired option,
then waits for the overlay/backdrop to close.
- Arguments:
-
- Returns:
Promise –
selectDropdown
-
dropdowns.selectDropdown(page, dropdownTitle)
- Arguments:
-
- Returns:
Promise –
selectDropdownValue
-
selectDropdownValue(page, identifier, dropdownLabel, options)
selectDropdownValue
Enhanced dropdown value selection with overlay handling and multiple strategies.
- Arguments:
page (Page) – Playwright page object
identifier (string) – The option text to select (e.g. “All”, “Paid”)
dropdownLabel (string) – Optional dropdown label for specific dropdown targeting
options – Configuration options
- Returns:
Promise –
selectMatOption
-
selectMatOption(page, labelText, optionName, delayMs)
Reliably selects an Item Type from the <mat-select> by label,
then picks the desired option, and waits for the backdrop to close.
- Arguments:
-
- Returns:
Promise –
selectStatusDropdown
-
selectStatusDropdown(page, dropdownTitle, optionToSelect, dropdownIndex)
Selects a dropdown option by label, supporting multiple identical dropdowns via index.
- Arguments:
page (Page) – Playwright page object
dropdownTitle (string) – Visible label/title of the dropdown
optionToSelect (string) – Option text to select
dropdownIndex (number) – (Optional) Index of the dropdown if multiple exist
- Returns:
Promise –
setItemsPerPage
-
setItemsPerPage(page, itemCount, timeoutMs)
Set items per page using the pagination combobox.
Works on any page with a pagination control.
- Arguments:
page (Page) – Playwright page object
itemCount (string) – Number of items per page (‘10’, ‘25’, ‘50’, ‘100’)
timeoutMs (number) – Timeout in ms (default: 8000)
- Returns:
Promise –