I am really struggling trying to select items from a dropdown. Here is the code snippet:
I don’t think I can use Select Option By here. I have also tried using WebUI.click using the full xpath, which ends up only selecting the first item in the list no matter what option I want to select.
Any help would be greatly appreciated.
I can’t help you with xpath - I only use CSS (you know, like the rest of the web does).
This css is a selector that targets the element you highlighted above:
#mat-option-0 > span
String js = "document.querySelector('#mat-option-0 > span').click();"
This worked great! Thank you!