From 5491893740b726b7c9577133f4f374a89086f7af Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Wed, 19 Nov 2025 09:41:51 -0800 Subject: [PATCH 1/4] Fix stale element exception with panorama dashboard --- .../tests/panoramapublic/PanoramaPublicMyDataViewTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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..45ad8a69 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(); + // "Panorama Public Search" re-renders webpart with a different name 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(); From c1771d797191db8f1e6300d904222aeb43024865 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Wed, 19 Nov 2025 09:44:49 -0800 Subject: [PATCH 2/4] Improve comment --- .../tests/panoramapublic/PanoramaPublicMyDataViewTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 45ad8a69..4cc42c25 100644 --- a/panoramapublic/test/src/org/labkey/test/tests/panoramapublic/PanoramaPublicMyDataViewTest.java +++ b/panoramapublic/test/src/org/labkey/test/tests/panoramapublic/PanoramaPublicMyDataViewTest.java @@ -192,8 +192,8 @@ private void verifyColumnValues(DataRegionTable table, int catalogEntryCol, int @NotNull private DataRegionTable myDataView() { - // "Panorama Public Search" re-renders webpart with a different name which can cause a - // StaleElementReferenceException. Find the dataregion by the updated webpart title. + // The "Panorama Public Search" re-renders the "Targeted MS Experiment List" webpart with a different name 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")); From 729c85691576d00c8fa7aeb65f18beca498b4289 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Wed, 19 Nov 2025 09:45:17 -0800 Subject: [PATCH 3/4] reupdate --- .../tests/panoramapublic/PanoramaPublicMyDataViewTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 4cc42c25..613ea4b7 100644 --- a/panoramapublic/test/src/org/labkey/test/tests/panoramapublic/PanoramaPublicMyDataViewTest.java +++ b/panoramapublic/test/src/org/labkey/test/tests/panoramapublic/PanoramaPublicMyDataViewTest.java @@ -192,8 +192,8 @@ private void verifyColumnValues(DataRegionTable table, int catalogEntryCol, int @NotNull private DataRegionTable myDataView() { - // The "Panorama Public Search" re-renders the "Targeted MS Experiment List" webpart with a different name which - // can cause a StaleElementReferenceException. Find the dataregion by the updated webpart title. + // The "Panorama Public Search" webpart re-renders the "Targeted MS Experiment List" webpart with a different + // name 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")); From 8673a1b071a71a260f376189837194ab647afde0 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Wed, 19 Nov 2025 09:45:41 -0800 Subject: [PATCH 4/4] name -> title --- .../test/tests/panoramapublic/PanoramaPublicMyDataViewTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 613ea4b7..5833d33d 100644 --- a/panoramapublic/test/src/org/labkey/test/tests/panoramapublic/PanoramaPublicMyDataViewTest.java +++ b/panoramapublic/test/src/org/labkey/test/tests/panoramapublic/PanoramaPublicMyDataViewTest.java @@ -193,7 +193,7 @@ private void verifyColumnValues(DataRegionTable table, int catalogEntryCol, int private DataRegionTable myDataView() { // The "Panorama Public Search" webpart re-renders the "Targeted MS Experiment List" webpart with a different - // name which can cause a StaleElementReferenceException. Find the dataregion by the updated webpart title. + // 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"));