Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlTableCell


    private void verifySource(HtmlTable sourceTable, int row, int coverageCount, String source, String alertLine, String cssClass) throws IOException {
        assertThat(sourceTable.getRow(row).getCell(1).asText(), equalTo(""+coverageCount));
        assertThat(sourceTable.getRow(row).getCell(3).asText(), equalTo(source));

        HtmlTableCell branchCell = sourceTable.getRow(row).getCell(2);
        if (alertLine == null) {
            assertThat(branchCell.asText(), equalTo(" "));
            assertThat(branchCell.getAttribute("class"), equalTo("numeric "+cssClass));
        } else {
            assertThat(branchCell.asText(), equalTo("info"));
            HtmlAnchor anchor = (HtmlAnchor) branchCell.getFirstChild().getFirstChild();

            final String alert[] = new String[1];
            webClient.setAlertHandler(new AlertHandler() {
                public void handleAlert(Page page, String message) {
                    alert[0] = message;
View Full Code Here


    Iterator allHtmlChildElements = htmlElementsByTagName.iterator();
    int counter = 0;
   
    while (allHtmlChildElements.hasNext()) {
      HtmlTable table = (HtmlTable) allHtmlChildElements.next();
      HtmlTableCell handleCell = (HtmlTableCell) table.getCellAt(0, 0);
      HtmlTableCell iconCell = (HtmlTableCell) table.getCellAt(0, 1);
      HtmlTableCell textCell = (HtmlTableCell) table.getCellAt(0, 2);
     
      Element element = (Element) findNode(textCell.asText(), document);
      //skip text siblings
      Node nextSibling = element.getNextSibling();
     
      //System.out.println(table);
      //System.out.println(handleCell);
View Full Code Here

     * Returns the index of this cell within the parent row.
     * @return the index of this cell within the parent row
     * @see <a href="http://msdn.microsoft.com/en-us/library/ms533549.aspx">MSDN Documentation</a>
     */
    public Integer jsxGet_cellIndex() {
        final HtmlTableCell cell = (HtmlTableCell) getDomNodeOrDie();
        final HtmlTableRow row = cell.getEnclosingRow();
        if (row == null) { // a not attached document.createElement('TD')
            return -1;
        }
        return new Integer(row.getCells().indexOf(cell));
    }
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.html.HtmlTableCell

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.