views:

20

answers:

1

Hi,

I have a website here which is continuously updated by Ajax. I'm using HtmlUnit in Java and need to get the updated text values but I don't know how.

For example: TextValue. When "TextValue" changed, how can I access the new value? I know there is a DomChangeListener (for added or removed nodes) and a HtmlAttributeChangeListener but I don't see a way the get the changed text values.

It must not necessarily be a notification (event), it would be ok for me to check the values manually every x seconds but the only way I tried is per page.asXML and page.asText, but the source is never updated, the values are always the first values when the page was loaded.

Anyone knows how to accomplish this task? Maybe another framework or completely other way to do it? Thanks.

Edit: It should run headless on a server. And the task it NOT to just refresh the page all the time to get the updated source-code.

A: 

http://sourceforge.net/tracker/?func=detail&aid=2818380&group_id=47038&atid=448269

it is a known bug in HTMLUnit, a patch is included at the link above

Aaron Saunders
Great, many thanks. Will try that!
MartinGitf