Package com.meterware.httpunit

Examples of com.meterware.httpunit.WebLink.click()


        LOGGER.debug("webURI: "+webURI);

        WebLink link = response.getLinkWithID("service-provider-1-id");
        assertNotNull("Cannot reach link with id: service-provider-1-id", link);

        response = link.click();
        assertTrue("Not properly redirected to sp-post1.war", response.getText().contains("Welcome to sp-post1.war"));
    }
}

View Full Code Here


    }
   
    private void testMainPage(WebConversation wc, WebResponse resp) throws Exception {
            // Test the Map page
            WebLink wl = resp.getLinkWith("Enter the Store");
            wl.click();
            resp = wc.getCurrentPage();       
    }
   
    private void testSellerPage(WebConversation wc, WebResponse resp) throws Exception {
            // Test the Map page
View Full Code Here

    }
   
    private void testSellerPage(WebConversation wc, WebResponse resp) throws Exception {
            // Test the Map page
            WebLink wl = resp.getLinkWith("Seller");
            wl.click();
            resp = wc.getCurrentPage();       
    }
   
    private void testCatalogPage(WebConversation wc, WebResponse resp) throws Exception {
            // Test the Map page
View Full Code Here

    }
   
    private void testCatalogPage(WebConversation wc, WebResponse resp) throws Exception {
            // Test the Map page
            WebLink wl = resp.getLinkWith("Catalog");
            wl.click();
            resp = wc.getCurrentPage();       
    }
   
    private void testMapPage(WebConversation wc, WebResponse resp) throws Exception {
            // Test the Map page
View Full Code Here

    }
   
    private void testMapPage(WebConversation wc, WebResponse resp) throws Exception {
            // Test the Map page
            WebLink wl = resp.getLinkWith("Map");
            wl.click();
            resp = wc.getCurrentPage();       
    }
   
    private void testTagsPage(WebConversation wc, WebResponse resp) throws Exception {
            // Test the Tags page
View Full Code Here

    }
   
    private void testTagsPage(WebConversation wc, WebResponse resp) throws Exception {
            // Test the Tags page
            WebLink wl = resp.getLinkWith("Tags");
            wl.click();
            resp = wc.getCurrentPage();       
    }
   
    /** This method tests the search Page. It also submits a query for cats and
     * verifies that the result has at least two items */
 
View Full Code Here

    /** This method tests the search Page. It also submits a query for cats and
     * verifies that the result has at least two items */
    private void testSearchPage(WebConversation wc, WebResponse resp) throws Exception {
        // Test the search page
        WebLink wl = resp.getLinkWith("Search");
        wl.click();
        resp = wc.getCurrentPage();
        // check if the search returns more than one result for "cat
        WebForm form = resp.getForms()[0];
        assertEquals("on", form.getParameterValue("searchForm:searchTags"));
        String searchText = "cat";
View Full Code Here

            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

TOP
Copyright © 2018 www.massapi.com. 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.