There is no libraries as far as I know but you can still automate. Here is the sample code:
public ArrayList<String> getDataFromListMaintenance(String ColumnName) {
ArrayList<String> sllineitems = new ArrayList<String>();
Boolean statusIterate = false;
List<WebElement> weitems = null;
try {
// By default 100 line items will be there on a page and 3 times we
// are iterating to capture all web elements due to slick view
// limitation
for (int a = 0; a <= 3 && !statusIterate; a++) {
weitems = driver
.findElements(By
.xpath("//*[contains(@style,'width: 100%; overflow: auto; outline: 0px none; position: relative; height: 425px;')]//*[contains(@style,'top:')]"));
for (int i = 1; i < weitems.size(); i++) { // i- starts from
// 1since first row
// is always blank
if (ColumnName.equalsIgnoreCase("VALUES")) {
WebElement e1 = weitems.get(i).findElement(
By.xpath(".//div[1]"));
sllineitems.add(e1.getText().toString());
} else if (ColumnName.equalsIgnoreCase("DESCRIPTION")) {
WebElement e2 = weitems.get(i).findElement(
By.xpath(".//div[2]"));
sllineitems.add(e2.getText().toString());
} else if (ColumnName.equalsIgnoreCase("BOTH")) {
WebElement e1 = weitems.get(i).findElement(
By.xpath(".//div[1]"));
WebElement e2 = weitems.get(i).findElement(
By.xpath(".//div[2]"));
sllineitems.add(e1.getText().toString() + ":"
+ e2.getText().toString());
System.out.println((e1.getText().toString() + ":" + e2
.getText().toString()));
}
}
if (weitems.size() >= 36) {
// WebElement element = driver
// .findElement(By
// .xpath("//*[contains(@style,'width: 100%; overflow: auto; outline: 0px none; position: relative; height: 425px;')]//*[contains(@style,'top:875')]"));
System.out.println("//div[contains(text(),'"
+ (sllineitems.get(sllineitems.size() - 1)
.substring(0, 21)) + "')]");
WebElement element = driver.findElement(By
.xpath("//div[contains(text(),'"
+ (sllineitems.get(sllineitems.size() - 1)
.substring(0, 21)) + "')]"));
((JavascriptExecutor) driver).executeScript(
"arguments[0].scrollIntoView(true);", element);
// Thread.sleep(1000);
System.out.println("SIZE:" + weitems.size());
} else {
statusIterate = true;
}
weitems.clear();
}
removeDuplicates(sllineitems);
} catch (Exception e) {
// TODO Auto-generated catch block
System.out.println(e.getMessage());
e.printStackTrace();
}
return sllineitems;