package ca.corefacility.bioinformatics.irida.ria.integration.pages.sequencingRuns;

import java.util.List;
import java.util.stream.Collectors;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import ca.corefacility.bioinformatics.irida.ria.integration.pages.AbstractPage;

/**
 * Page displaying the list of sequencing runs
 * 
 *
 */
public class SequencingRunsListPage extends AbstractPage {

	public static String PAGEURL = "sequencingRuns/";
	private static final Logger logger = LoggerFactory.getLogger(SequencingRunsListPage.class);

	public SequencingRunsListPage(WebDriver driver) {
		super(driver);
	}

	public void goTo() {
		get(driver, PAGEURL);
		// wait for rows to be shown
		waitForElementVisible(By.className("run-row"));
	}

	public List<Long> getDisplayedIds() {
		logger.trace("Listing runs");
		List<WebElement> rows = driver.findElements(By.className("run-row"));
		return rows.stream().map((r) -> {
			return Long.parseLong(r.findElement(By.className("run-id")).getText());
		}).collect(Collectors.toList());

	}

}

@@ -88,61 +88,81 @@
 ort 
-java.util.List;%0Aimport java.util.stream.Collectors
+ca.corefacility.bioinformatics.irida.ria.integration.pages.AbstractPage
 ;%0A
-%0A
 impo
@@ -334,79 +334,58 @@
 ort 
-ca.corefacility.bioinformatics.irida.ria.integration.pages.AbstractPage
+java.util.List;%0Aimport java.util.stream.Collectors
 ;%0A%0A/
@@ -701,16 +701,16 @@
 iver) %7B%0A
-
 %09%09super(
@@ -718,16 +718,66 @@
 river);%0A
+%09%09waitForElementVisible(By.className(%22run-row%22));%0A
 %09%7D%0A%0A%09pub

Check to make sure the table is loaded