Examples of HtmlSelect


Examples of com.gargoylesoftware.htmlunit.html.HtmlSelect

        assertTrue(-1 != commandText.indexOf("DAS Command:"));//heading
        assertTrue(-1 != commandText.indexOf("ExecuteCommand"));//button text

        //list values
        HtmlForm commandForm = commandPage.getFormByName("DasForm");
        HtmlSelect commandList = (HtmlSelect)commandForm.getHtmlElementById("DasCommand");
        List commandListOptions = commandList.getOptions();
        //System.out.println(" commandListOptionsText-->\n" + commandListOptions.toString());
        String allOptionsText = "";
        for(int i=0; i<commandListOptions.size(); i++){
          HtmlOption curOption = (HtmlOption)commandListOptions.get(i);
          String curOptionText = curOption.getValueAttribute();
          allOptionsText = allOptionsText + curOptionText;
          if(curOptionText.equals("DeleteDepartmentFromFirstCompany")){
            commandList.setSelectedAttribute(curOption, true);
            //System.out.println("delete option..."+curOptionText);
          }
        }
        assertTrue(-1 != allOptionsText.indexOf("NullCommand"));//check each option
        assertTrue(-1 != allOptionsText.indexOf("AllCompanies"));//check each option
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlSelect

                break;
            }
        }
        assertNotNull(tr);
        HtmlElement settingsMainElement = tr.getOneHtmlElementByAttribute("td", "class", "setting-main");
        HtmlSelect select = (HtmlSelect)settingsMainElement.getChildElements().iterator().next();
        Iterator<HtmlElement> iterator = select.getChildElements().iterator();
        HtmlElement option = iterator.next();
        String value = option.getAttribute("value");
        //This will test that the default values are correct.
        assertEquals("First value should be CRVW", "CRVW", value);
        option = iterator.next();
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlSelect

                break;
            }
        }
        assertNotNull(tr);
        HtmlElement settingsMainElement = tr.getOneHtmlElementByAttribute("td", "class", "setting-main");
        HtmlSelect select = (HtmlSelect)settingsMainElement.getChildElements().iterator().next();

        Iterator<HtmlElement> iterator = select.getChildElements().iterator();

        HtmlElement option = iterator.next();
        String value = option.getAttribute("value");
        //This will test that the default values are correct.
        assertEquals("First value should be VRIF", "VRIF", value);
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.