Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlAnchor.click()


  HtmlInput htmlSliderInput = (HtmlInput) renderedView.getHtmlElementById(dfSlider.getClientId(facesContext)+"slider_val");
  htmlSliderInput.setValueAttribute(value);

      HtmlAnchor htmlLink = (HtmlAnchor) renderedView.getHtmlElementById(command.getClientId(facesContext));
      htmlLink.click();

      List lastParameters = this.webConnection.getLastParameters();
      for (Iterator iterator = lastParameters.iterator(); iterator.hasNext();) {
      KeyValuePair keyValue = (KeyValuePair) iterator.next();
View Full Code Here


    public void testDecode() throws Exception {
        HtmlPage page = renderView();
        assertNotNull(page);
       
        HtmlAnchor anchor = (HtmlAnchor)page.getDocumentElement().getHtmlElementById(command.getClientId(facesContext));
        anchor.click();
        externalContext.addRequestParameterMap(orderingList.getClientId(facesContext), "sa1:2");
        externalContext.addRequestParameterMap(orderingList.getClientId(facesContext), "0:1");
        orderingList.processDecodes(facesContext);
        Object submittedValue = orderingList.getSubmittedValue();
        assertNotNull(submittedValue);
View Full Code Here

         
        });
       
        page = renderView();
        anchor = (HtmlAnchor)page.getDocumentElement().getHtmlElementById(command.getClientId(facesContext));
        anchor.click();
        externalContext.addRequestParameterMap(orderingList.getClientId(facesContext), "sa1:2");
        externalContext.addRequestParameterMap(orderingList.getClientId(facesContext), "0:1");
        orderingList.processDecodes(facesContext);
        assertTrue(facesContext.getMessages().hasNext());
    }
View Full Code Here

   
    //clicking on an image
    assertTrue(page.getElementById("albumImage").getAttribute("src").contains("space.gif"));
    DomNodeList<HtmlElement> ele= table.getRow(3).getCell(0).getElementsByTagName("a");
    final HtmlAnchor anchor =(HtmlAnchor) ele.get(0);
    final HtmlPage page2= anchor.click();
    Thread.sleep(3000);
    //checking whether there are images in the album
    assertTrue( page2.getElementById("albumImage").getAttribute("src").contains("/photark/gallery/vegas/dsc00860.jpg"));

  }
View Full Code Here

   
    //clicking on an image
    assertTrue(page.getElementById("albumImage").getAttribute("src").contains("space.gif"));
    DomNodeList<HtmlElement> ele= table.getRow(3).getCell(0).getElementsByTagName("a");
    final HtmlAnchor anchor =(HtmlAnchor) ele.get(0);
    final HtmlPage page2= anchor.click();
    Thread.sleep(3000);
    //checking whether there are images in the album
    assertTrue( page2.getElementById("albumImage").getAttribute("src").contains("/photark/gallery/vegas/dsc00860.jpg"));

  }
View Full Code Here

   
    //clicking on an image
    assertTrue(page.getElementById("albumImage").getAttribute("src").contains("space.gif"));
    DomNodeList<HtmlElement> ele= table.getRow(3).getCell(0).getElementsByTagName("a");
    final HtmlAnchor anchor =(HtmlAnchor) ele.get(0);
    final HtmlPage page2= anchor.click();
   
    Thread.sleep(3000);
    //checking whether there are images in the album
    assertTrue( page2.getElementById("albumImage").getAttribute("src").contains("/photark/gallery/vegas/dsc00860.jpg"));
View Full Code Here

    // Click the nav tree.
    String linkLabel = "Web Application (WAR)s";
    //HtmlAnchor warLink = getNavTreeLink(linkLabel);
    HtmlAnchor warLink = ejtt.navTree.getNodeLink(linkLabel);
    warLink.click();

    // click on the "Add new resource" button
    DebugUtils.writeFile("target/testDeployWAR-beforeAdd.html", client.getPageAsText());///
    client.click("actionHeaderForm:addNewContent")// 404 if setThrowExceptionOnFailingStatusCode(true) above
View Full Code Here

    public void testLink() throws IOException {
        HtmlAnchor anchor = (HtmlAnchor)page.getElementById("link1");
        assertTrue(anchor.getHrefAttribute().contains("faces/login.xhtml"));
        assertEquals("Login1", anchor.asText());
       
        HtmlPage output = anchor.click();
        assertEquals("HTTP GET (Login)", output.getTitleText());
    }

    @Test
    public void testLinkWithParam() throws IOException {
View Full Code Here

        HtmlAnchor anchor = (HtmlAnchor)page.getElementById("link2");
        assertTrue(anchor.getHrefAttribute().contains("faces/login.xhtml"));
        assertTrue(anchor.getHrefAttribute().contains("?name=Jack"));
        assertEquals("Login2", anchor.asText());
       
        HtmlPage output = anchor.click();
        assertEquals("HTTP GET (Login)", output.getTitleText());
    }
       
    @Test
    public void testLinkWithPreProcessParams() {
View Full Code Here

        FrameWindow menuFrame = page.getFrameByName("fixed");
        HtmlPage menuPage = (HtmlPage)menuFrame.getEnclosedPage();

        //basic content
        HtmlAnchor adhocAnchor = menuPage.getAnchorByHref("./indexAdhoc.jsp");
        HtmlPage adhocPage = (HtmlPage)adhocAnchor.click();
        String adhocText = adhocPage.asText();
        //System.out.println("adhoc html-->\n" + adhocText);
        assertTrue(-1 != adhocText.indexOf("Adhoc SQL Query"));//heading
        assertTrue(-1 != adhocText.indexOf("ExecuteQuery"));//button text
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.