Dear Sebastien,
Please read the general documents of HtmlUnit, they should be enough.
Also you can look into the GWT 1.4 sample tests in
http://htmlunit.svn.sourceforge.net/viewvc/htmlunit/trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/GWT14Test.java?view=markup
(the tests include starting and closing webserver).
>>> To get a widget and therefore to access to its content you seem to use identifier of the widget. How do you know the widget identifiers ?
You can use HtmlPage.getHtmlElementById() or .getByXPath(), there are
other 'search' methods, but these two are the most common.
> - Does you framework work with GWT 1.5 ? with GWT-ext 2.x ?
With IE simulation, HtmlUnit works with GWT 1.5M1, but not with FF
simulation. It wasn't tested with GWT-ext 2.x
> My fear with your project is to write test code depending on how the
> GWT compiler builds the html page. For instance if the compiler
> changes (new version for instance) the architecture of the html page
> could change.
No, HtmlUnit goal is to simulate real browsers, independent of GWT,
Dojo, Prototype, jQuery or any specific version of them. Even if the
structure changes, and HtmlUnit doesn't work, then it is a bug that
has to be tackled.
Please feel free to contact the team if you have any issue.
Thanks a lot,
Ahmed