Class ComboBoxPw
java.lang.Object
in.virit.mopo.ComboBoxPw
Helper class to work with vaadin-combo-box component
-
Constructor Summary
ConstructorsConstructorDescriptionComboBoxPw(com.microsoft.playwright.Locator gridLocator) Creates a ComboBox page object for the given locator. -
Method Summary
Modifier and TypeMethodDescriptionFills given filter to the combobox.voidfilterAndSelectFirst(String filter) Searches for given term in the ComboBox and picks the first suggestion.com.microsoft.playwright.LocatorClicks on the dropdown toggle button in the ComboBox to show the options.com.microsoft.playwright.LocatorReturns a locator for the combobox overlay that contains current suggestionsselectOption(String option) Selects a given option from currently open suggestions.
-
Constructor Details
-
ComboBoxPw
public ComboBoxPw(com.microsoft.playwright.Locator gridLocator) Creates a ComboBox page object for the given locator.- Parameters:
gridLocator- the Playwright locator for the combobox to be interacted with
-
-
Method Details
-
filterAndSelectFirst
Searches for given term in the ComboBox and picks the first suggestion.- Parameters:
filter- the string to be searched for
-
filter
Fills given filter to the combobox.- Parameters:
filter- the filter string to be set- Returns:
- the
ComboBoxPw(for fluent API)
-
selectOption
Selects a given option from currently open suggestions.- Parameters:
option- the text of the option to select- Returns:
- the ComboBoxPw for further configuration
-
selectionDropdown
public com.microsoft.playwright.Locator selectionDropdown()Returns a locator for the combobox overlay that contains current suggestions- Returns:
- the locator for selection overlay
-
openDropDown
public com.microsoft.playwright.Locator openDropDown()Clicks on the dropdown toggle button in the ComboBox to show the options.- Returns:
- a Locator to the selection dropdown
-