I would say go with what you feel is right, but keep the existing API
a bit in mind, otherwise people have to rebuild all their tests :).
Martijn
On 6/16/06, Julien Henry <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Hi everybody,
>
> There are many things that need a real cleanup, but the first that I
> want to do is buttons management.
>
> Currently, we have :
> clickButton(String buttonId)
> clickButtonWithText(String buttonValueText)
> clickElementByXPath(String xpath)
> submit()
> submit(String buttonName)
> submit(String buttonName, String buttonValue)
> reset()
>
> In HTML 4.01 or XHTML 1.0, we can have many different possibilities :
> <form>
> <input type="submit">
> <input type="reset">
> <input type="button">
> <button type="submit">
> <button type="reset">
> <button type="button">
> </form>
> I don't know if it is legal to use one of it outside of a form, but I
> think it's possible (especially for client-side scripting), and
> validator.w3.org has no problem with a page like :
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title>Test</title>
> </head>
> <body>
> <p>
> <input type="button" name="button1">
> </p>
> </body>
> </html>
>
> Currently, all our methods call assertFormPresent() in first place and I
> don't think it's a good thing, as it seems to be allowed to have a
> button outside a form...
>
> There is also the problem of button identification : by text, by name,
> by id, by image inside, by XPath...
> Should we add as many methods as possible, or provide generic method ?
> Example :
> clickButton(String type, String attribut, String value);
>
> -> clickButton("button", "name", "button1"); for <button name="button1">
> or <input type="button" name="button1">
> -> clickButton("reset", "id", "reset_btn"); for <input type="reset
> id="reset_btn"> or <button type="reset id="reset_btn">
> -> clickButton("submit", "", ""); for <input type="submit"> or <button
> type="submit">
>
> Or perhaps only provide the clickElementByXPath() method ?
>
> ++
> Julien
>
> This message contains information that may be privileged or confidential and
> is the property of the Capgemini Group. It is intended only for the person to
> whom it is addressed. If you are not the intended recipient, you are not
> authorized to read, print, retain, copy, disseminate, distribute, or use
> this message or any part thereof. If you receive this message in error,
> please notify the sender immediately and delete all copies of this message.
>
>
>
> _______________________________________________
> Jwebunit-development mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jwebunit-development
>
--
Download Wicket 1.2 now! Write Ajax applications without touching JavaScript!
-- http://wicketframework.org
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development