Package net.sourceforge.jwebunit

Examples of net.sourceforge.jwebunit.LinkImagePredicate


        WebTable timeTable;
        try {
            timeTable = taskPage.getTableWithID("time_entries");
            int lastRowIndex = timeTable.getRowCount() - 1;
            TableCell lastRowCell = timeTable.getTableCell(lastRowIndex, 0);
            HTMLElementPredicate imagePredicate = new LinkImagePredicate();
            WebLink editLink = lastRowCell.getFirstMatchingLink(imagePredicate, EDIT_IMAGE);
            editLink.click();
        } catch (Exception e) {
            throw new RuntimeException(ExceptionUtility.stackTraceToString(e));
        }
View Full Code Here


        HttpUnitDialog dialog = getDialog();
        WebResponse storyPage = dialog.getResponse();
        try {
            WebTable noteTable = storyPage.getFirstMatchingTable(new TextInTablePredicate(), subject);
            TableCell linkCell = noteTable.getTableCell(linkRowInNoteTable, 0);
            WebLink deleteLink = linkCell.getFirstMatchingLink(new LinkImagePredicate(), imageName);
            clickLink(deleteLink);
        } catch (Exception e) {
            throw new RuntimeException(ExceptionUtility.stackTraceToString(e));
        }
    }
View Full Code Here

            if (objectTable == null)
                throw new RuntimeException("Acceptance tests require table with id = " + tableId);
            int rowToSearchForLink = getFirstRowNumberWithText(objectTable, text);
            for (int column = 0; column < objectTable.getColumnCount(); column++) {
                TableCell cell = objectTable.getTableCell(rowToSearchForLink, column);
                LinkImagePredicate predicate = new LinkImagePredicate();
                WebLink editLink = cell.getFirstMatchingLink(predicate, imageName);
                if (editLink != null) {
clickLink(                    editLink);
                    foundLink = true;
                    break;
View Full Code Here

TOP

Related Classes of net.sourceforge.jwebunit.LinkImagePredicate

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.