Hi again, Am close to having a patch to propose - it currently uses the src and alt attributes of an image to identify it, but that can probably be improved (maybe by using a (partial) xpath expression to allow more flexibility), but I have to quick questions: - how can I the current URL of a given 'window' / the current 'context' ? ideally from WebTester. If not, I guess I'll have to rely on the plugin implementation to determine that. (Because I need to get the URL of an image, relative to the page under test, not relative to the context) - how do you prefer the patch submitted? Do you guys use the sourceforge stuff, or have a jira instance somewhere?
Cheers, g On 31/07/06, Jon Frisby <[EMAIL PROTECTED]> wrote: > > 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