[Webtest] Custom step VerifyFontAttributes added to community site

Paul King webtest@lists.canoo.com
Fri, 13 Aug 2004 16:31:32 +1000


As per note below, I am not sure this will be widely needed but it
was one of the steps in Aatish's patch from a while ago so I thought
I would put it on the community site to make it easily available
for those that want it.


VerifyFontAttributes description:

This custom step allows checking of font attributes, e.g. font face, 
size, color.

This is a modified version of the one included in Aatish Arora's patch 
file sent to the mailing list.

Notes: If you don't want to install this custom step you can probably 
achieve the same thing
(albeit with more steps) using regex and/or xpath. Also, this step only 
works for the HTML
font element; it doesn't work for font attributes set using CSS (which 
is now nearly always
preferred), so you might find this step only useful for older sites.


<verifyFontAttributes stepid="check font color and face"
   text="Danger.*Robinson" regex="true" face="courier" color="red" />
<verifyFontAttributes stepid="check font size"
   text="Danger Will Robinson" size="4" />

<font color="red" size="4" face="courier">Danger Will Robinson</font>