Skip to content

Commit 6210f0b

Browse files
committed
Attempt to fix intermittent test failures
1 parent ed2f2ce commit 6210f0b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,13 @@ private String getExampleData(String currentWindow)
290290
if (!currentWindow.equals(handle))
291291
{
292292
_test.getDriver().switchTo().window(handle);
293-
String text = getPageText();
294-
ret = StringUtils.trimToNull(text);
293+
ret = StringUtils.trimToNull(getPageText());
294+
if (ret == null)
295+
{
296+
// NOTE: this fails intermittently. Perhaps due to loading timing?
297+
BaseWebDriverTest.sleep(1000);
298+
ret = StringUtils.trimToNull(getPageText());
299+
}
295300
Assert.assertNotNull("Unable to retrieve example data", StringUtils.trimToNull(ret));
296301

297302
_test.getDriver().close();

0 commit comments

Comments
 (0)