You can always make use of ANT - setup a macrodef that takes attributes
and manipulate the attributes (they're not immutable and can be
overwritten every call).
"Kallin Nagelberg" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
08/13/2008 05:30 PM
Please respond to
[EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
Subject
[Webtest] Re: running groovy code within groovy webtests.
Does anyone read this list anymore?
I've realized that executing groovy code during the webtest is just about
impossible without using the groovy task.
With that in mind, what is the best way to write a test that extracts data
from one page to use in another? I needs to use an xpath to grab a value
from a page after an invoke, and then use that value in a form later on.
Any ideas would be much appreciated!
On Mon, Aug 11, 2008 at 3:53 PM, Kallin Nagelberg <
[EMAIL PROTECTED]> wrote:
I am trying to figure out how I can run arbitrary groovy code within my
groovy webtests.
I have a test like this:
webtest(description) {
storeXPath
xpath:"/html/body/table/tbody/tr[1]/td/table[2]/tbody/tr[2]/td[1]",
property:"myProp"
}
I'd like to be able to take a look at that property, do some
manipulations, and use it for another task. I find when I stick even a
println after the storeXpath it gets evaluated before the test is even
run. Any ideas would be appreciated!