Get All Dropdown Options
Use locator.locator('option') to get all options in a select element, then iterate with .all().
Task:
- Navigate to
https://testkru.com/Elements/Dropdowns - Get all options from
#singleSelect - Print the total count
- Print each option's visible text (skip the placeholder)
Expected output:
Total options: 6 Java Python JavaScript C# Ruby
TestKru