[Webtest] RE: WebTest fails on Petstore 2.0
Soula, William" <email@example.com
Mon, 7 Jul 2008 07:29:00 -0500
Have you tried the easyajax config option (http://www.nabble.com/Ajax-Testi=
ng-to16051425.html#a16051885)? Or adding a sleep statement before the veri=
fyText to wait for the text to appear. I think what is happening is that W=
ebTest loads the page and then moves on to verifying the text but ajax hasn=
't finished loading the text.
From: firstname.lastname@example.org [mailto:email@example.com] =
On Behalf Of Paul Beck
Sent: Saturday, July 05, 2008 8:54 PM
Subject: [Webtest] WebTest fails on Petstore 2.0
I am doing a comparison of various web application testing tools. WebTest a=
ppeared to be a strong contender from the documentation, however that turne=
d out not to be the case in practice. I am using the Petstore 2.0 applicati=
on from Sun's Blueprints as a basis for test, as this has a lot of AJAX stu=
ff in it. Simple assertions fail as WebTest apparently does not see the tex=
t that is displayed via AJAX. Here is a trivial test which fails:
<webtest name=3D"check that petstore categories can be found by cli=
description=3D"Go to Petstore 2.0"/>
<verifyTitle text=3D"Java Pet Store Reference Application" />
<verifyText text=3D"Beach Dog"/>
ain Page" />
It cannot find any text of the page. If I click on the failed step
(verifyText) Page link, it displays a page with almost no text.
What am I doing wrong?
In addition, XPath expressions that work in Selenium-RC or Watir fail in We=
bTest. For example, on the home page for Petstore, the images on the left w=
hich are displayed as a dojo pick list can be accessed and clicked on via t=
he XPath //img[@src=3D"/petstore/images/dogs_icon.gif"] in either Watir or =
Selenium. Also, the WebTest recorder recognizes this as a valid XPath expre=
ssion but a <verifyXPath /> fails as does any use of it in a test.
Am I missing something?
WebTest mailing list