[Webtest] running groovy code within groovy webtests.

Kallin Nagelberg Kallin Nagelberg" <kallin.nagelberg@gmail.com
Mon, 11 Aug 2008 15:53:22 -0400


------=_Part_57897_4350362.1218484402422
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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!

------=_Part_57897_4350362.1218484402422
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr">I am trying to figure out how I can run arbitrary groovy code within my groovy webtests.<br><br>I have a test like this:<br><br>webtest(description) {<br>storeXPath xpath:&quot;/html/body/table/tbody/tr[1]/td/table[2]/tbody/tr[2]/td[1]&quot;, property:&quot;myProp&quot;<br>
}<br><br>I&#39;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!<br>
<br></div>

------=_Part_57897_4350362.1218484402422--