Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlElement.type()


    */
   public void type(String componentID, char c) throws IOException
   {
      HtmlElement element = (HtmlElement)getElement(componentID);
      if (element == null) throw new ComponentIDNotFoundException(componentID);
      element.type(c);
   }
  
   /**
    * Click a JSF component.
    *
 
View Full Code Here


    private void typeNewValue(HtmlPage page, String inplaceInputId, String value) throws Exception {
        HtmlElement input = page.getFirstByXPath("//*[@id = '" + inplaceInputId + "Input']");
        assertNotNull(input);
        input.setAttribute(HtmlConstants.VALUE_ATTRIBUTE, "");
        input.type(value);
    }

    private void blur(HtmlPage page) throws Exception {
        HtmlElement panel = page.getFirstByXPath("//*[@id = 'form:panel']");
        panel.click();
View Full Code Here

      // get the actual HtmlUnit element
      HtmlElement actual = ((HtmlUnitElementImpl) element).getHtmlElement();
      assertNotNull(actual);
     
      // type in the text
      actual.type(text);
     
      // wait until all background tasks (setTimeout, ...) are finished
      while (((HtmlUnitTestingEngineImpl) getTestingEngine()).getWebClient().waitForBackgroundJavaScript(500) != 0);
     
      // and return
View Full Code Here

    private void typeNewValue(HtmlPage page, String inplaceInputId, String value) throws Exception {
        HtmlElement input = page.getFirstByXPath("//*[@id = '" + inplaceInputId + "Input']");
        assertNotNull(input);
        input.setAttribute(HtmlConstants.VALUE_ATTRIBUTE, "");
        input.type(value);
    }

    private void blur(HtmlPage page) throws Exception {
        HtmlElement panel = page.getFirstByXPath("//*[@id = 'form:panel']");
        panel.click();
View Full Code Here

    public void testRendering() throws Exception {
        HtmlPage page = environment.getPage("/NestedRepeatTest.jsf");

        for (int i = 0; i < 3; i++) {
            HtmlElement input = page.getElementById("form:outer:" + i + ":inner:0:input");
            input.type(Integer.toString(i));
        }

        HtmlElement ajax = page.getElementById("form:ajax");
        page = ajax.click();
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.