Skip to content

Commit

Permalink
SampleFinder: fix issues with stale dropdown element
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-alan committed Jan 23, 2024
1 parent 3390c67 commit bb712e2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/org/labkey/test/components/ui/search/SampleFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public List<FilterCard> getSearchCards()

public SavedSearchesMenu getSaveSearchMenu()
{
return new SavedSearchesMenu(elementCache().savedSearchesContainer, getDriver(), elementCache().saveViewsDropdown());
return new SavedSearchesMenu(elementCache().savedSearchesContainer, getDriver(), elementCache().savedSearchesButton);
}

public MultiMenu getSaveSearchDropdownBtn()
Expand Down Expand Up @@ -238,13 +238,10 @@ FilterCard findFilterCard(String queryName)
final MultiMenu saveDropdown = new MultiMenu.MultiMenuFinder(getDriver()).findWhenNeeded(splitButton);

final Locator.XPathLocator savedSearchesButtonLoc = Locator.byClass("search-selector");
final WebElement savedSearchesContainer = Locator.byClass("dropdown").withChild(savedSearchesButtonLoc).findWhenNeeded(this);

final WebElement saveViewsDropdown()
{
return savedSearchesButtonLoc.findElement(this);
}
final WebElement savedSearchesButton = savedSearchesButtonLoc.findWhenNeeded(this);

final WebElement savedSearchesContainer = Locator.byClass("dropdown").withChild(savedSearchesButtonLoc).refindWhenNeeded(this);
}

public class SavedSearchesMenu extends BootstrapMenu
Expand Down

0 comments on commit bb712e2

Please sign in to comment.