Hmmm, that's a good one.
The only problem I have with adding it on WebTestCase is that in theory the
same need could exist for any of the asserts (i.e. if there is no link
present with this id, then click on a link with some other id). Supporting
all of that would strech the API out, and it's already pretty busy ;-).
I think I would keep this in the extending / using code (option two - but
put it in it's own method).
I would not call the assert method / catch the exception, though, I'd go to
the HttpUnitDialog method like this:
(method in some subclass of webtestcase specific to your company)
public boolean isTextPresent(String text) {
return super.getDialog().isTextInResponse(text);
}
Hope this helps,
Jim
Jim Weaver
Software Developer - ThoughtWorks
Office : 615-850-4724
Cell : 312-286-7496
[EMAIL PROTECTED] wrote on 09/14/2004
12:10:11 PM:
> I want to add the following to the API starting from the WebTestCase
>
> public boolean isTextPresent(String text) {
>
> }
>
>
> My goal here being in my company specific concrete class, I need to
verify
> that a specific text is present, if it is then I need to click dialog
boxes
> accordingly.
>
> Option two is catch the exception from the assertTextPresent() and then
> return true / false. This doesn't seem like a good solution.
>
> Any thoughts???
>
> Nick Neuberger
-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
Jwebunit-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development