[Webtest] ANN: new custom step verifySchema
Lothar Märkle
webtest@lists.canoo.com
Thu, 15 Sep 2005 10:15:25 +0200
Hello Marc,
> On Mon, Sep 12, 2005 at 03:00:02PM +0200, Marc Guillemot wrote:
> > Seems interesting. Can it validate xml files as well?
> I did not try this, but it only uses the Page class and does not
> distinguish HTML or XML. So it should work I think.
I tried it and realized that HtmlPage and XmlPage are quite different
for Xpath. So I looked at VerifyXPath and took this approach to support
xml files as well. An updated version is uploaded to the wiki.
greetings,
lothar
> > Can the description
> > be specified in an external file?
> Not with a special attribute, but entity expansion will work here too?
>
> lothar
> > Lothar Märkle wrote:
> > >hi,
> > >
> > >I added a new verifySchema custom step to the wiki:
> > >http://webtest-community.canoo.com/wiki/space/Contributions+and+Uploads/VerifySchema
> > >
> > >It's a extension to check html constraints you place on your site.
> > >
> > >an example:
> > ><verifySchema xpath="/html/body/div">
> > >element div {
> > > attribute id {"123"},
> > > text,
> > > element b {text},
> > >}
> > ></verifySchema>
> > >
> > >whoul accept a div tag that looks like:
> > ><div id="123">laber<b>rabarber</b></div>
> > >but not sth like:
> > ><div>...</div>...no id attribute
> > >nor
> > ><div id="124">...</div>...wrong id attribute content
> > >nor
> > ><div id="123"><b>asdf</b></div>...no text before b tag
> > >etc.
> > >
> > >any comments whould be appreciated:)
> > > lothar
> > >
> >
> > _______________________________________________
> > WebTest mailing list
> > WebTest@lists.canoo.com
> > http://lists.canoo.com/mailman/listinfo/webtest
>
> --
> Lothar Märkle - lothar.maerkle@netpioneer.de
> Netpioneer GmbH - Beiertheimer Allee 18a - D-76137 Karlsruhe
> Tel: 0721 / 9 20 60 43
> Fax: 0721 / 9 20 60 30
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest