File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
src/main/java/in/virit/mopo Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 11package in .virit .mopo ;
22
33import com .microsoft .playwright .Locator ;
4-
4+ import java . util . List ;
55import static com .microsoft .playwright .assertions .PlaywrightAssertions .assertThat ;
66
77/**
@@ -38,6 +38,23 @@ public void filterAndSelectFirst(String filter) {
3838 assertThat (root ).not ().hasAttribute ("opened" , "" );
3939 }
4040
41+ /**
42+ * Filters the MultiSelectComboBox by searching for each term provided in the filter
43+ * list and selects the first suggestion for each term.
44+ *
45+ * @param filterList a list of strings representing the terms to be searched
46+ * for and selected in the ComboBox
47+ */
48+ public void filterAndSelectFirstMultiSelect (List <String > filterList ) {
49+ root .locator ("input" ).press ("Escape" );
50+ for (String filter : filterList ) {
51+ filter (filter );
52+ root .locator ("input" ).press ("Enter" );
53+ root .locator ("input" ).press ("Escape" );
54+ }
55+ root .locator ("input" ).press ("Escape" );
56+ }
57+
4158 /**
4259 * Fills given filter to the combobox.
4360 *
You can’t perform that action at this time.
0 commit comments