Search in sources :

Example 6 with HtmlTable

use of com.gargoylesoftware.htmlunit.html.HtmlTable in project selenium_java by sergueik.

the class JenkinsConfigurationPage method getUserPermissionRowNumber.

public int getUserPermissionRowNumber(final String userName) {
    int retval = -1;
    final HtmlTable securityMatrix = getSecurityMatrix();
    for (int rowCtr = 0; rowCtr < securityMatrix.getRowCount(); rowCtr++) {
        final HtmlTableRow row = securityMatrix.getRow(rowCtr);
        if (row.getAttribute("name").equalsIgnoreCase(userName)) {
            retval = rowCtr;
            break;
        }
    }
    return retval;
}
Also used : HtmlTableRow(com.gargoylesoftware.htmlunit.html.HtmlTableRow) HtmlTable(com.gargoylesoftware.htmlunit.html.HtmlTable)

Aggregations

HtmlTable (com.gargoylesoftware.htmlunit.html.HtmlTable)6 HtmlPage (com.gargoylesoftware.htmlunit.html.HtmlPage)3 Test (org.junit.Test)2 WebClient (com.gargoylesoftware.htmlunit.WebClient)1 HtmlElement (com.gargoylesoftware.htmlunit.html.HtmlElement)1 HtmlInput (com.gargoylesoftware.htmlunit.html.HtmlInput)1 HtmlTableRow (com.gargoylesoftware.htmlunit.html.HtmlTableRow)1 IOException (java.io.IOException)1