Hi, trunk is totally experimental. I don't pretend this kind of architecture is a good idea, because it leads to a deeper complexity. Locators is a try to resolve a recurrent problem with JWebUnit: one want a method to find input by name, one want a method to find input by id, one want a method to find image by src, one want a method to find image by alt, ... With the current architecture, we have to add a new method in IJwebUnitDialog for each need.
clickButton(String id) clickButtonByName(String name)unnamed clickInputButtonByNameAndValue(String name, String value) clickButtonByNameAndIndexAndColorAndSizeAndPositionInPage(String, String, int, int, ...) So I decided to try a similar system than Selenium : click(Locator l) where Locator could be anything for our need. Currently, Locator could be anything that can be described with an XPath expression. But your remark reveal it's not perfect, because with can't have a locator for all type of button. We need at least 2 XPath expression: //[EMAIL PROTECTED]'button' or @type='submit' or @type='reset' or @type='image'] //[EMAIL PROTECTED]'button' or @type='submit' or @type='reset'] Perhaps should we modify Locator to contain a list of XPath expression... ++ Julien ----- Message d'origine ---- De : Lasse Koskela <[EMAIL PROTECTED]> À : Usage problems for jWebUnit <[email protected]> Envoyé le : Jeudi, 25 Janvier 2007, 20h03mn 58s Objet : [JWebUnit-users] Regarding <button> and <input> Hi, I took a quick look at what's in the trunk right now and noticed that there are separate "locators" for <input/> and <button/> style buttons (HtmlButtonLocator, HtmlSubmitInputLocator, HtmlResetInputLocator). A cursory scan through the list of locators didn't reveal a locator that would find _any_ kind of button, which is kind of a bummer for me as I'd like to think that one should be able to change their "implementation details" (html) without changing tests. It's not a biggie, but it did bring up enough motions that I decided to speak up and ask about it... Lasse ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ JWebUnit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users ___________________________________________________________________________ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ JWebUnit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
