File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
LDK/test/src/org/labkey/test/util/external/labModules Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -276,11 +276,6 @@ public String clickAndGetExampleData()
276276 return getExampleData (currentWindow );
277277 }
278278
279- public String getExampleData ()
280- {
281- return getExampleData (_test .getDriver ().getWindowHandle ());
282- }
283-
284279 @ LogMethod (quiet = true )
285280 private String getExampleData (String currentWindow )
286281 {
@@ -290,17 +285,12 @@ private String getExampleData(String currentWindow)
290285 Assert .assertTrue ("Expected more than one open window, was: " + handles .size (), handles .size () > 1 );
291286 for (String handle : _test .getDriver ().getWindowHandles ())
292287 {
288+ _test .log ("window: " + handle );
293289 if (!currentWindow .equals (handle ))
294290 {
295291 _test .getDriver ().switchTo ().window (handle );
296- ret = StringUtils .trimToNull (getPageText ());
297- if (ret == null )
298- {
299- // NOTE: this fails intermittently. Perhaps due to loading timing?
300- BaseWebDriverTest .sleep (1000 );
301- ret = StringUtils .trimToNull (getPageText ());
302- }
303- Assert .assertNotNull ("Unable to retrieve example data" , StringUtils .trimToNull (ret ));
292+ ret = _test .shortWait ().withMessage ("Unable to retrieve example data" )
293+ .until (wd -> StringUtils .trimToNull (getPageText ()));
304294
305295 _test .getDriver ().close ();
306296 _test .getDriver ().switchTo ().window (currentWindow );
You can’t perform that action at this time.
0 commit comments