File tree Expand file tree Collapse file tree
src/org/labkey/test/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -390,11 +390,17 @@ private void addItem(CharSequence fieldKey, ViewItemType type)
390390
391391 // Expand all nodes necessary to reveal the desired node.
392392 WebElement fieldRow = expandPivots (fieldKey );
393- WebElement checkbox = Locator .css ("input[type=button]" ).findElement (fieldRow );
394- WebElement rowLabel = Locator .byClass ("x4-tree-node-text" ).findElement (fieldRow );
395- rowLabel .click ();
393+ WebElement checkbox = Locator .css ("input[type=button]" ).refindWhenNeeded (fieldRow );
394+
395+ // In some situations calling Checkbox(checkbox).check() doesn't always check the checkbox. Verify that it has
396+ // been checked, and if not try again.
396397 ScrollUtils .scrollIntoView (checkbox );
397398 new Checkbox (checkbox ).check ();
399+ if (!new Checkbox (checkbox ).isChecked ())
400+ {
401+ new Checkbox (checkbox ).check ();
402+ }
403+
398404 itemXPath (type , fieldKey ).waitForElement (this , 2_000 );
399405 }
400406
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ private WebElement waitForNotificationList()
198198
199199 // Find the container again, don't return listContainer WebElement previously found. If the list was slow to
200200 // update with the most recent notification the old reference will be stale.
201- return notificationsContainerLocator .waitForElement ( elementCache ().menuContent , 1_000 );
201+ return notificationsContainerLocator .refindWhenNeeded (( elementCache ().menuContent ) );
202202 }
203203
204204 /**
You can’t perform that action at this time.
0 commit comments