Menu

#1 missing submit button

open
nobody
None
5
2002-09-03
2002-09-03
No

I'm just getting started here, so be patient with me.

What constitutes a submit button?

I've got HTML like this:

<button name="fred" type="submit" TABINDEX="3"
CLASS="button">OK
</button>

I'm using this code to retrieve it -- I'm getting NO submit
buttons.

wc=DefaultWebFactory.getFactory().newWebClient
();
wc.openPage
("http://localhost:8080/crmWeb/test.crm");
WebResponse currentPage = wc.getCurrentState();

WebForm logonForm = currentPage.getForms()[0];

SubmitButton[] buttons =
logonForm.getSubmitButtons();
System.out.println("number of buttons [" +
buttons.length + "]");

Thanks in advance,

Erik Ostermueller
erik.ostermueller@alltel.com

Discussion

  • Erik Ostermueller

    Logged In: YES
    user_id=180587

    Here is the printTree dump from my button:

    WebTag: name:null tag:BUTTON
    nativeID:tagname=BUTTON,index=0,href=http://localhost:8080
    /crmWeb/test.crm Atrs:type=submit name=fred tabindex=3
    class=button

     
  • Erik Ostermueller

    Logged In: YES
    user_id=180587

    I found a way around this:

    In DefaultWebClient.java,

    private static DefaultWebTag genTag(HTMLNode el,
    RuntimeHandler rh)
    throws RemoteException

    I added a clause to treat BUTTON tags
    just like INPUT tags. Here is the code I added:

    else if (tagName.equalsIgnoreCase("BUTTON"))
    {
    childTag= createInput(el,rh);
    }

     

Log in to post a comment.