When HttpUnit was replaced by HtmlUnit, these methods were marked as deprecated 
because they were too "Http level" compliant. With HtmlUnit, we can be much 
more precise on the type of FormElement (text input, checkbox, select, ...).
My first intention was to replace for example assertFormElementEquals by 
assertTextFieldEquals, assertCheckboxChecked, assertSelectedValueEquals, ...

But sometimes, you may want to test your server code, and you don't care about 
the type of HTML element. You just want to assert the data that will be posted 
with the form (http level). It was debated in the past on this list, and the 
final decision was to not delete old **FormElement** methods.

People who want to test their HTML page should really use the HTML specific 
method: assertTextFieldEquals, assertCheckboxChecked, 
assertSelectedValueEquals, ...

People who don't care about HTML and are only concerned by form params and 
values can use **FormElement**.

I suppose the documentation and the API should be updated... but I'm the only 
developper for a while, and my first priority is to improve 
SeleniumTestingEngine.

++

Julien


----- Message d'origine ----
De : Ed Smith <[EMAIL PROTECTED]>
À : jwebunit-users@lists.sourceforge.net
Envoyé le : Vendredi, 25 Mai 2007, 0h25mn 44s
Objet : [JWebUnit-users] Deprecated methods

WebTester and WebTestCase contain several deprecated methods for which no 
alternate method is shown:


 void
assertFormElementEmpty(String formElementName)



          Deprecated.  



 void
assertFormElementEquals(String formElementName,
                        String expectedValue)



          Deprecated.  



 void
assertFormElementMatch(String formElementName,
                       String regexp)



          Deprecated.  
What are the correct methods to use?  Could the API be updated?  Also the 
example in quick start (http://jwebunit.sourceforge.net/quickstart.html) uses 
deprecated methods.  Could this be updated?




 
____________________________________________________________________________________
Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.
http://farechase.yahoo.com/promo-generic-14795097

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users





      
_____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to