On Jul 31, 2006, at 5:09 AM, Julien HENRY wrote: > Hi Grégory, > > The only way to test image is to use XPath, you're right. Someone > else ping me about the need of assertImagePresent() method, so I > will try to add it ASAP. > > Concerning the point "validate the urls actually point to valid > images", I'm not sure it is the purpose of jWebUnit. Some users > asked us to add a possibility to validate pages before testing (by > using tools like JTidy I think). You could write a new framework > that test dead links, and final users can freely choose to use > jWebUnit, you tools, or both. But if it is a very small addition > (only for image links), why not. You could write a method named > assertImageExists(String url) for example. Perhaps other guys could > express their opinion on that point.
Having something like "assertImageExists(url)" is not without utility, but I think it would be more flexible and useful to say "assertImageIsValid(String xpath)" -- this decouples the test from the physical implementation (I.E. I don't need to know where the image lives in the document heirarchy, just where it winds up on the page). Having it be a separate framework is bothersome because then I need to either integrate it with jWebUnit or duplicate testing efforts. -JF ------------------------------------------------------------------------- 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 Jwebunit-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jwebunit-users