### Question:
Table extends AbstractElement { public int getRowIndex(String[] searchKeys) { int numKey = searchKeys.length; int rowCount = getNumberOfRows(); String xPathBase, xPath, value; xPathBase = getXPathBase(); int rowIndex = -1; for (int i = getDataStartIndex(); i <= rowCount; i++) { xPath = xPathBase + "tr[" + i + "]"; value = HtmlElementUtils.locateElement(xPath).getText(); if (value.length() > 0) { for (int s = 0; s < numKey; s++) { if (searchKeys[s] != null && ((String) searchKeys[s]).length() > 0) { if (value.contains((CharSequence) searchKeys[s])) { rowIndex = i; } else { rowIndex = -1; break; } } } } if (rowIndex > 0) { break; } } return rowIndex; } Table(String locator);  Table(String locator, String controlName);  Table(ParentTraits parent, String locator);  Table(String locator, String controlName, ParentTraits parent); synchronized int getDataStartIndex(); int getNumberOfRows(); int getNumberOfColumns(); int getRowIndex(String[] searchKeys); String getValueFromCell(int row, int column); void clickLinkInCell(int row, int column); String getXPathBase(); String getRowText(int rowIndex); void checkCheckboxInCell(int row, int column); void uncheckCheckboxInCell(int row, int column);  }### Answer:
@Test(groups = { "browser-tests" }) @WebTest public void tableTestGetRowIndex() { Grid.driver().get(TestServerUtils.getTestEditableURL()); String rowValue[] = { "Sep 9,2011", "Payment", "Completed" }; assertTrue((testTable.getRowIndex(rowValue) == 2), "Validate get row index"); }