[Webtest] Building R_646 and using prepareDialogResponse
Paul King
webtest@lists.canoo.com
Wed, 05 Jan 2005 05:58:50 +1000
The "R_" is just the release number (AKA build number). You shouldn't
need to do a custom build just to use the Dialog steps (but you may have
other custom steps). They are mostly in the main distribution now. There
are unit and functional tests (and xdoclet style doco) but no examples.
The doco for the original custom Dialog steps on the community site is
more complete but out of date. It doesn't mention the optional
savePropertyType attribute. You will mostly never need it. The default
is "dynamic" and the other sometimes used value would be "ant". If you
look in the extension steps syntaxReference for the main distribution
you can see the details.
In your example, is there some kind of clickbutton or clicklink between
the prepareDialogResponse and verifyProperty? I would expect such a step
as it fires off the JavaScript. The clickbutton would be the one with
the actual JavaScript or a reference to the JavaScript function in the
onClick attribute.
Cheers, Paul.
HURSTG@Nationwide.com wrote:
>
> What does the 'R_' prepended on the build number mean?
>
> I tried building R_646 and got the results at the end of this letter.
> Two tests fail, but a webtest.jar file is produced. Combining this jar
> with the latest downloadable build file appears to work for the simplest
> cases. I am trying to test a simple JavaScript with:
>
> <prepareDialogResponse stepid="Save first JavaScript Response"
> dialogType="confirm" saveProperty="initialDialog"
> savePropertyType="dynamic" response="true" />
> <verifyProperty stepid="Check text from first JavaScript Dialog"
> text="Are you sure?" name="initialDialog" propertyType="dynamic" />
>
> But I get the error:
>
> E:\_TESTING\testtesting\build.xml:6: The following error occurred while
> executing this line:
> Test step verifyProperty
> (E:\_TESTING\testtesting\Modules\checkformjs.xml:28: )
> named "Check text from first JavaScript Dialog" failed with message
> "Expected property "initialDialog" to be defined!"
>
> The saveProperty attribute of prepareDialogResponse should define the
> property, shouldn't it? Do I have the syntax wrong? I checked against
> the latest documentation. The savePropertyType attribute in
> prepareDialogResponse was a guess on my part (the latest documentation
> seems to be blank for this attribute), however I get the same error
> irregardless of what savePropertyType is set to.
>
> Jerry