Skip to content

Commit

Permalink
Select: Make button locator more speciffic
Browse files Browse the repository at this point in the history
When there is an item selected it would click on the clear button
instead of the toggle button when trying to access items or calling
open(), this fixes that.
  • Loading branch information
jrusz committed Feb 19, 2024
1 parent 58fa739 commit c2f84b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgetastic_patternfly5/components/menus/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class BaseSelect:
https://www.patternfly.org/components/menus/select
"""

BUTTON_LOCATOR = ".//button"
BUTTON_LOCATOR = ".//button[contains(@class, '-c-select__toggle-button')]"
ITEMS_LOCATOR = (
".//ul[contains(@class, '-c-menu__list') or contains(@class, '-c-select__menu')]/"
"li[contains(@class, '-c-menu__list-item') or contains(@class, '-c-select__menu-wrapper')]"
Expand Down

0 comments on commit c2f84b4

Please sign in to comment.