diff --git a/panoramapublic/test/src/org/labkey/test/tests/panoramapublic/PanoramaPublicMyDataViewTest.java b/panoramapublic/test/src/org/labkey/test/tests/panoramapublic/PanoramaPublicMyDataViewTest.java index 17b31a9b..5833d33d 100644 --- a/panoramapublic/test/src/org/labkey/test/tests/panoramapublic/PanoramaPublicMyDataViewTest.java +++ b/panoramapublic/test/src/org/labkey/test/tests/panoramapublic/PanoramaPublicMyDataViewTest.java @@ -7,6 +7,7 @@ import org.labkey.test.BaseWebDriverTest; import org.labkey.test.categories.External; import org.labkey.test.categories.MacCossLabModules; +import org.labkey.test.components.WebPartPanel; import org.labkey.test.util.ApiPermissionsHelper; import org.labkey.test.util.DataRegionTable; import org.openqa.selenium.By; @@ -191,7 +192,10 @@ private void verifyColumnValues(DataRegionTable table, int catalogEntryCol, int @NotNull private DataRegionTable myDataView() { - var table = new DataRegionTable.DataRegionFinder(getDriver()).refindWhenNeeded(); + // The "Panorama Public Search" webpart re-renders the "Targeted MS Experiment List" webpart with a different + // title which can cause a StaleElementReferenceException. Find the dataregion by the updated webpart title. + var table = new DataRegionTable.DataRegionFinder(getDriver()) + .find(WebPartPanel.WebPart(getDriver()).withTitle("Panorama Public Experiments").waitFor()); assertTrue(table.hasHeaderMenu("My Data")); table.clickHeaderButtonAndWait("My Data"); return new DataRegionTable.DataRegionFinder(getDriver()).refindWhenNeeded();