[Webtest] Verify Stylesheets
Denis N. Antonioli
webtest@lists.canoo.com
Wed, 2 Feb 2005 12:19:25 +0100 (CET)
On Wed, 2 Feb 2005, Paul King wrote:
> Denis N. Antonioli wrote:
> > Thinking loud about it, couldn't we adapt verifyLinks to accept an xpath
> > attribute?
> > The attribute would then select the kind of link to verify:
> >
> > <verifyLinks /> as now, checks the href
> > <verifyLinks xpath="//a/@href" /> same as now, but explicit
> > <verifyLinks xpath="//img/@src" /> verify the link for all the images
> > <verifyLinks xpath="/html/head/link[@rel='stylesheet']/@href" /> verify
> > the link for all the stylesheets.
> >
> > Does that make sense?
>
> Great idea - though the tricky cases might be harder.
> E.g., apart from the "//img/@src" images,
> there are the ones which are image buttons,
Not yet tested, but it sure is possible. Something like:
//img/@src || //button[@type='image']/@src
That makes a nice test case to write :-)
> the ones which are referenced in style sheets (e.g. background images)
> and the ones mentioned in JavaScript (though I don't think we will ever
> get those via static analysis).
>
> Cheers, Paul.
See my other mail. What are reasonable limit of webtests? Or how many time
do we have? ;-)
dna