Skip to content

Commit

Permalink
Handle missing info banner correctly (#2134)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-tchad authored Nov 8, 2024
1 parent 7effbad commit b35fe28
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/org/labkey/test/components/domain/DomainFormPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
import org.labkey.test.components.ui.grids.ResponsiveGrid;
import org.labkey.test.params.FieldDefinition;
import org.labkey.test.selenium.WebElementWrapper;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;

import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
Expand Down Expand Up @@ -555,7 +557,14 @@ public WebElement getPanelAlertWebElement(int index)

public List<WebElement> getPanelAlertElements()
{
return BootstrapLocators.infoBanner.waitForElements(this, 1000);
try
{
return BootstrapLocators.infoBanner.waitForElements(this, 1000);
}
catch (NoSuchElementException nothing)
{
return Collections.emptyList();
}
}

@Override
Expand Down

0 comments on commit b35fe28

Please sign in to comment.