Unable to click on this dropdown list since it does not have an ID, how could I click on this select class?
CodePudding user response:
Refer to this documentation to learn how to use selectors to select elements.
Since your dropdown has an html attribute you can use Selector.withAttribute Method.
CodePudding user response:
You can use the classname, classname with the element name to locating the element.
await t.click(Selector("select.product_sort_container"));
You will have to master location strategies to locate elements in the web pages. All elements will not have IDs.
Reference :
Recipe : Test <Select> Elements