Hi Kosta,

Thanks for your reply.
I tried using using the following code to print the options in the select box but got the same option of no values being populated

    HtmlSelect select = (HtmlSelect)page.getElementById("property_code");
    System.out.println(select.getOptions());

Output :: 

[HtmlOption[<option value="" selected="selected">]]

Any pointers to update the DOM element I guess will be helpful.

Thanks
Arindam

On Wed, Mar 16, 2011 at 6:56 PM, Kostadin Chikov <kostadin.chikov@interes.com> wrote:
Hi Arindam,

try getting the html element, updated by the Ajax call, with getElementById or getElementByName. then use getTextContent or asText. The updated html elements may not be shown when you print the page, but they are there.

Regards,
Kosta




On 03/16/2011 01:32 PM, Arindam Ray wrote:
Hi All,

I was trying to integrate and test a page using HTMLUnit which contains AJAX calls.
The Call is made onchange of a select box which in turn populates another select box.

I tried with by adding
webClient.setAjaxController(new NicelyResynchronizingAjaxController()); 

also used 
webClient.waitForBackgroundJavaScript(20000);

to wait for the request to complete.But when I print the HtmlPage it still does not show the newly added options in the select box.

Any help would be very much appreciated.

--
ARINDAM RAY
------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d
_______________________________________________ Htmlunit-user mailing list Htmlunit-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/htmlunit-user

-- 
InteRes GmbH - Kostadin Chikov

Rheinstrasse 44-46 64283 Darmstadt 
fon: +49 6151 307 40-22 fax: -11 
www.interes.com kostadin.chikov@interes.com 

Geschäftsführer: Volker Herrmann und Thomas Kreß
Registergericht: Amtsgericht Darmstadt
Registernummer: HRB 6831/Darmstadt
Steuernummer: DE 189 632 313

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Htmlunit-user mailing list
Htmlunit-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-user




--
ARINDAM RAY