[Webtest] RE: TooLTips

Nate Oster Nate Oster" <noster@numbersix.com
Sat, 2 Dec 2006 12:08:16 -0500


Mark,
If by "tooltips," you mean the ALT or TITLE tag on links and images,
then the easiest way to test that is using an XPath expression.  Since
these are just attributes of HTML tags, you can easily search the entire
page for them.

For example, the XPath "//*[@title=3D'Home']" would match the Home <a>
link in the following HTML fragment:

<a title=3D"Home" href=3D"/index.shtml" class=3D"topnav">
Home
</a>
<a title=3D"About Us" href=3D"/About.shtml" class=3D"topnav">
About Us
</a>=20

You can use the <VerifyXPath> tag to check XPath expressions in your
tests.  Once you get comfortable with XPath, it's probably WebTest's
most versatile feature.

To write XPaths quickly without a lot of syntax knowledge, my project
uses Firefox with two extensions:=20
-View Formatted Source, which has an "inline" mode for quickly selecting
small subsections of the HTML source.
-XPather, a handy tool for writing and testing XPath expressions against
your test webpages.

Hope this helps!
Nate Oster


Date: Fri, 01 Dec 2006 17:10:20 +0000
From: Mark McKeown <Mark.McKeown@aepona.com>
Subject: [Webtest] Tootlips

Hi Guys,

does webtest support the testing of mouse-over tooltips?

Thanks in advance,
Mark