Examples of HtmlOption


Examples of br.com.objectos.way.ui.builder.HtmlOption

    assertThat(ui, hasToString(equalTo("<select class=\"span2\"></select>")));
  }

  public void option_teste() {
    HtmlOption ui = Html.option()
        .end();

    assertThat(ui, hasToString(equalTo("<option></option>")));
  }
View Full Code Here

Examples of br.com.objectos.way.ui.builder.HtmlOption

    assertThat(ui, hasToString(equalTo("<option></option>")));
  }

  public void option_value() {
    HtmlOption ui = Html.option()
        .value("value")
        .end();

    assertThat(ui, hasToString(equalTo("<option value=\"value\"></option>")));
  }
View Full Code Here

Examples of br.com.objectos.way.ui.builder.HtmlOption

    assertThat(ui, hasToString(equalTo("<option value=\"value\"></option>")));
  }

  public void option_text() {
    HtmlOption ui = Html.option()
        .text("Text")
        .end();

    assertThat(ui, hasToString(equalTo("<option>Text</option>")));
  }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlOption

        HtmlElement element = (HtmlElement) form.selectSingleNode(".//tr[td/div/input/@value='choice']");
        assertNotNull(element);
        assertEquals("choice description", ((HtmlElement) element.selectSingleNode("td/div")).getAttribute("description"));
        assertEquals("choice", ((HtmlElement) element.selectSingleNode("td[@class='setting-name']")).getTextContent());
        HtmlOption opt = (HtmlOption)element.selectSingleNode("td/div/select/option[@value='Choice <2>']");
        assertNotNull(opt);
        assertEquals("Choice <2>", opt.asText());
        opt.setSelected(true);

        submit(form);
        Queue.Item q = hudson.getQueue().getItem(project);
        if (q != null) q.getFuture().get();
        else Thread.sleep(1000);
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlOption

      Element element = getElement(parentID);
      HtmlSelect htmlSelect = (HtmlSelect)element;
     
      String optionValue = getSelectItemValue(componentID);
     
      HtmlOption htmlOption = htmlSelect.getOptionByValue(optionValue);
      htmlOption.click();
   }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlOption

        assertFalse(page.<HtmlElement>getHtmlElementById("newAlbumName").getAttribute("style").contains("display: none;"));
        assertFalse(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
        assertFalse(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));

        //selecting an album from drop down
        HtmlOption option = select.getOption(1);
        option.click();
        Thread.sleep(3000);
        //testing whether the expected changes has happened
        assertTrue(select.asText().contains("boston"));
        assertTrue(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlOption

        assertFalse(page.<HtmlElement>getHtmlElementById("newAlbumName").getAttribute("style").contains("display: none;"));
        assertFalse(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
        assertFalse(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));

        //selecting an album from drop down
        HtmlOption option = select.getOption(1);
        option.click();
        Thread.sleep(3000);
        //testing whether the expected changes has happened
        assertTrue(select.asText().contains("boston"));
        assertTrue(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlOption

        assertFalse(page.<HtmlElement>getHtmlElementById("newAlbumName").getAttribute("style").contains("display: none;"));
        assertFalse(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
        assertFalse(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));

        //selecting an album from drop down
        HtmlOption option = select.getOption(1);
        option.click();
        Thread.sleep(3000);
        //testing whether the expected changes has happened
        assertTrue(select.asText().contains("boston"));
        assertTrue(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlOption

    return form.getSelectsByName(getName());
  }

  protected void setField(final HtmlElement elt) {
    final HtmlSelect select;
    final HtmlOption option;
    if (elt instanceof HtmlOption)
    {
      option = (HtmlOption) elt;
      select = (HtmlSelect) option.getEnclosingElement(HtmlConstants.SELECT); // TODO: can be simplified with next htmlunit build
    }
    else if (elt instanceof HtmlSelect)
    {
      select = (HtmlSelect) elt;
      // if htmlId or xpath specified, we know now first that text, value or optionIndex is needed
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlOption

    select.setSelectedAttribute(option, true);
  }

  private static void deselectOtherOptions(final HtmlSelect select, final HtmlOption option) {
    for (final Iterator iter = select.getOptions().iterator(); iter.hasNext();) {
      final HtmlOption curOpt = (HtmlOption) iter.next();
      if (curOpt != option && curOpt.isSelected()) {
        curOpt.setSelected(false);
      }
    }
  }
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.