1717
1818import org .apache .commons .lang3 .StringUtils ;
1919import org .jetbrains .annotations .Nullable ;
20- import org .junit .Assert ;
2120import org .labkey .test .BaseWebDriverTest ;
2221import org .labkey .test .Locator ;
23- import org .labkey .test .WebDriverWrapper ;
2422import org .labkey .test .util .DataRegionTable ;
2523import org .labkey .test .util .Ext4Helper ;
2624import org .labkey .test .util .UIAssayHelper ;
2725import org .labkey .test .util .ext4cmp .Ext4CmpRef ;
2826import org .labkey .test .util .ext4cmp .Ext4ComboRef ;
2927import org .labkey .test .util .ext4cmp .Ext4FieldRef ;
3028import org .labkey .test .util .ext4cmp .Ext4GridRef ;
31- import org .openqa .selenium .TimeoutException ;
3229
3330import java .io .File ;
3431import java .text .SimpleDateFormat ;
3532import java .util .List ;
3633import java .util .Random ;
37- import java .util .Set ;
3834
3935import static org .junit .Assert .assertEquals ;
4036import static org .junit .Assert .assertTrue ;
@@ -252,33 +248,8 @@ public void goToAssayResultImport(String assayName, boolean supportsTemplates)
252248 _test .waitForText ("Data Import" );
253249 }
254250
255- public String clickAndGetExampleData ()
256- {
257- Locator btn = Locator .linkContainingText ("Download Example Data" );
258- _test .waitForElement (btn );
259- _test .waitAndClick (btn );
260-
261- int iterations = 0 ;
262- while (_test .getDriver ().getWindowHandles ().size () < 2 )
263- {
264- iterations ++;
265- WebDriverWrapper .sleep (100 );
266-
267- if (iterations > 20 )
268- {
269- throw new TimeoutException ("Timed out waiting for second browser window" );
270- }
271- }
272-
273- return getExampleData ();
274- }
275-
276251 public String getExampleData ()
277252 {
278- String ret = null ;
279-
280- Set <String > handles = _test .getDriver ().getWindowHandles ();
281- Assert .assertTrue ("Expected more than one open window, was: " + handles .size (), handles .size () > 1 );
282253 String currentWindow = _test .getDriver ().getWindowHandle ();
283254 for (String handle : _test .getDriver ().getWindowHandles ())
284255 {
@@ -288,13 +259,10 @@ public String getExampleData()
288259 String text = getPageText ();
289260 _test .getDriver ().close ();
290261 _test .getDriver ().switchTo ().window (currentWindow );
291- ret = StringUtils . trimToNull ( text ) ;
262+ return text ;
292263 }
293264 }
294-
295- Assert .assertNotNull ("Unable to retrieve example data" , StringUtils .trimToNull (ret ));
296-
297- return ret ;
265+ return null ;
298266 }
299267
300268 public Locator toolIcon (String name )
0 commit comments