Best place to look at the moment is in the selftests:
http://webtest.canoo.com/fisheye/browse/CanooWebTest/selftests/tests/verifyContent.xml?r=13146
If your input was:
<html>
<head>
<title>Dummy</title>
</head>
<body>
Dummy page
</body>
</html>
Then after running:
<verifyContent referenceFile="expectedResultOnlyTags.html">
<lineSeparatorFilter/>
<contentStripper description="remove content leaving only tags"/>
</verifyContent>
Would pass so long as your reference file contained:
<html><head><title></title></head><body></body></html>
It used to be the case that you could get the above reference
content generated for you or alternatively feed your expectation
in from a previous saved input with dummy values. I.e. the dummy
values would be stripped out of both the input and the referencefile.
I don't think those switches are working at the moment.
You might also consider the replaceFilter. If your dates always
end with PST and are always inside a span of class MstTxt, something
like the following, although a little brittle, might work (not tested):
<replaceFilter regex='(<span class="MstTxt">)[^>]*PST(</span>)'
replacement="$1[DATE REMOVED]$2"/>
An example of usage is in the verifyContent manual page.
Paul.
Chang Su wrote:
Hi,
can someone provide me an example on how to use
contentStripper and tagStripper? I could not find it
in webtest manual pages. It says in verifyContent
manual, but it is not there.
what I am trying to do is to filter following part
from BUI page before the comparison because it
contains dynamic date and time which causes
verifyContents fails.
...
<div class="MstTmeDiv"><span class="MstTxt">Last
Update:</span> <span class="MstTxt">Feb 16, 2007
3:28:42 PM PST</span> </div>...
how to use contentStripper or any filter in this case?
thanks,
Chang
____________________________________________________________________________________
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest