EDIT: Disregard this post; I'm probably going to move over to HtmlUnit instead, which has much better Ajax support.
To start off, I'm very new to HttpUnit and Ajax.
Ok, so I need to test an Ajax enabled submit button with HttpUnit. Here's what I'm currently doing in my HttpUnit test:
public void testNextPageButton() throws Exception
System.out.println("start of testNextPage");
WebResponse nextPage, nextPage2, nextPage3;
WebForm nextPageForm, nextPageForm2, nextPageForm3;
//webConv represents browser (emulates browser behavior)
WebConversation webConversation = new WebConversation();
//webResp represents page (actual response from website).
//Pass address to getResponse method from browser, put that into the page
WebResponse webResponse = webConversation.getResponse(ADDRESS);
WebForm form = webResponse.getForms(); //select first form in page
I'm trying to follow the submit buttons like I normally would in an httpUnit test. However, it doesn't appear to work, and the S.O.P's that I've posted is what I get during execution of the HttpUnit test. Does anyone know what I should be doing to the Ajax-enabled buttons instead of what I'm currently doing? Or, does anyone have a link to a useful resource that has information about using Ajax-enabled buttons with HttpUnit? Or even a link that has help with using Ajax with HttpUnit? Any help at all would be appreciated. Thanks.
Then YOU must do the pig's work! Read this tiny ad. READ IT!
a bit of art, as a gift, that will fit in a stocking