Examples of HtmlElement


Examples of com.gargoylesoftware.htmlunit.html.HtmlElement

     * @param name
     *      This corresponds to the @name of <f:submit />
     */
    public HtmlPage submit(HtmlForm form, String name) throws Exception {
        for( HtmlElement e : form.getHtmlElementsByTagName("button")) {
            HtmlElement p = (HtmlElement)e.getParentNode().getParentNode();
            if(p.getAttribute("name").equals(name)) {
                // To make YUI event handling work, this combo seems to be necessary
                // the click will trigger _onClick in buton-*.js, but it doesn't submit the form
                // (a comment alluding to this behavior can be seen in submitForm method)
                // so to complete it, submit the form later.
                //
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement

        final Page enclosedPage = currentWindow_.getEnclosedPage();
        if (enclosedPage instanceof HtmlPage) {
            final Window jsWindow = (Window) currentWindow_.getScriptObject();
            if (jsWindow != null) {
                if (getBrowserVersion().isIE()) {
                    final HTMLElement activeElement = (HTMLElement) jsWindow.jsxGet_document().jsxGet_activeElement();
                    if (activeElement != null) {
                        ((HtmlPage) enclosedPage).setFocusedElement(activeElement.getDomNodeOrDie(), true);
                    }
                }
                else {
                    final HtmlElement focusedElement = ((HtmlPage) enclosedPage).getFocusedElement();
                    if (focusedElement != null) {
View Full Code Here

Examples of com.meterware.httpunit.HTMLElement

     * @param id HTML element id
     * @param text expected text
     * @throws Exception
     */
    private void checkText(WebResponse resp,String id,String text) throws Exception {
        HTMLElement element = resp.getElementWithID(id);
        assertNotNull(element);
        assertEquals(text,element.getText());
    }
View Full Code Here

Examples of com.meterware.httpunit.HTMLElement

     * @param id HTML element id
     * @param text expected start of the text
     * @throws Exception
     */
    private void checkTextStart(WebResponse resp,String id,String text) throws Exception {
        HTMLElement element = resp.getElementWithID(id);
        assertNotNull(element);
        assertTrue(element.getText().startsWith(text));
    }
View Full Code Here

Examples of com.meterware.httpunit.HTMLElement

     * @param id HTML element id
     * @param text expected contained text
     * @throws Exception
     */
    private void checkTextContent(WebResponse resp,String id,String text) throws Exception {
        HTMLElement element = resp.getElementWithID(id);
        assertNotNull(element);
        assertTrue(element.getText().indexOf(text) != -1);
    }
View Full Code Here

Examples of com.meterware.httpunit.HTMLElement

     * @param id HTML element id
     * @param regex expected regex
     * @throws Exception
     */
    private void checkTextRegex(WebResponse resp,String id,String regex) throws Exception {
        HTMLElement element = resp.getElementWithID(id);
        assertNotNull(element);
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(element.getText());
        assertTrue(matcher.matches());
    }
View Full Code Here

Examples of com.psddev.dari.util.HtmlElement

        for (HtmlNode node : getHeadNodes()) {
            if (!(node instanceof HtmlElement)) {
                continue;
            }

            HtmlElement element = (HtmlElement) node;

            if (name.equals(element.getName()) &&
                    element.hasAttributes(attributes)) {
                return element;
            }
        }

        return null;
View Full Code Here

Examples of mf.org.w3c.dom.html.HTMLElement

    }
   
   
    public synchronized HTMLElement createCaption()
    {
        HTMLElement    section;
       
        section = getCaption();
        if ( section != null )
            return section;
        section = new HTMLTableCaptionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "CAPTION" );
View Full Code Here

Examples of mf.org.w3c.dom.html.HTMLElement

    }
   
   
    public synchronized HTMLElement createTHead()
    {
        HTMLElement    section;
       
        section = getTHead();
        if ( section != null )
            return section;
        section = new HTMLTableSectionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "THEAD" );
View Full Code Here

Examples of mf.org.w3c.dom.html.HTMLElement

    }
   
   
    public synchronized HTMLElement createTFoot()
    {
        HTMLElement    section;
       
        section = getTFoot();
        if ( section != null )
            return section;
        section = new HTMLTableSectionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TFOOT" );
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.