File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
test/src/org/labkey/test/tests/reagent Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1515 */
1616package org .labkey .test .tests .reagent ;
1717
18+ import org .awaitility .Awaitility ;
1819import org .junit .BeforeClass ;
1920import org .junit .Test ;
2021import org .junit .experimental .categories .Category ;
3233import org .openqa .selenium .WebElement ;
3334import org .openqa .selenium .interactions .Actions ;
3435
36+ import java .time .Duration ;
3537import java .util .Arrays ;
3638import java .util .List ;
3739import java .util .Map ;
@@ -111,8 +113,10 @@ public void testInsert()
111113
112114 click (Locator .xpath ("//input[@name='LabelId']/../img" ));
113115 setFormElement (Locator .xpath ("//input[@name='LabelId']/../input[contains(@class, 'x-form-field')]" ), "Alexa" );
114- int alexaLabels = getElementCount (Locator .tag ("div" ).withClass ("x-combo-list-item" ).notHidden ().containing ("Alexa" ));
115- assertEquals ("Expected to find 5 Alexa labels" , 5 , alexaLabels );
116+ Locator locator = Locator .tag ("div" ).withClass ("x-combo-list-item" ).notHidden ().containing ("Alexa" );
117+ // Wait for combo box to be filtered
118+ Awaitility .await ().atMost (Duration .ofSeconds (2 )).untilAsserted (() ->
119+ assertEquals ("Expected to find 5 Alexa labels" , 5 , locator .findElements (getDriver ()).size ()));
116120
117121 Actions builder = new Actions (getDriver ());
118122 builder .sendKeys (Keys .ARROW_DOWN , Keys .ARROW_DOWN ).build ().perform ();
You can’t perform that action at this time.
0 commit comments