I really can't say which version of webtest I'm using... I downloaded it some 
time ago and now I don't remember (and can't find a method to find out, since 
"webtest -version" just reports the version of ant).  There's no specific error 
message -- it just appears that an incorrect page gets loaded, since the 
anchors found aren't what they should be...

"somepage" in the second example is a variable holding the url "somepage".  If 
I put quotes around it, the value of the variable doesn't get substituted.

AntBuilder doesn't appear to work either.  Changing the instantiation from "ant 
= new MacroStepBuilder(step)" to "ant = new AntBuilder(step)" results in the 
same erroneous results.

Thanks!

 
----- Original Message ----
From: Dierk König <[email protected]>
To: [email protected]
Sent: Sunday, March 22, 2009 9:52:42 AM
Subject: Re: [Webtest] Difference between two versions of invoke?

Hi,

what version do you use and what error message do you get?

MacroStepBuilder is not needed any longer since quite some time.
You can use Groovy's AntBuilder.

What's the value of "somepage"? or are the quotes missing?

cheers
Dierk

Am 22.03.2009 um 01:58 schrieb Gynivore:

> 
> What's the difference between '<invoke url="somepage">' and 'ant.invoke(url: 
> somepage)' ?
> 
> I've got a test where, if I use the former, I get the page content I expect, 
> but if I use the latter, the page content is not as expected...
> 
> This works as I expect, allowing retrieval of the correct anchors:
> 
>      <invoke url="somepage" description="Get it"/>
>      <scriptStep description="Process it" language="groovy">
>        document.getHtmlElementsByAttribute('a', 'title', 
>'SpecialAnchor').each {
>            ...
>        }
>      </scriptStep>
> 
> But this doesn't:
> 
>      <scriptStep description="Process it" language="groovy">
>        ant = new com.canoo.webtest.extension.groovy.MacroStepBuilder(step)
>        ant.invoke(url: somepage);
>        document.getHtmlElementsByAttribute('a', 'title', 
>'SpecialAnchor').each {
>            ...
>        }
>      </scriptStep>
> 
> Anyone have some insight as to why?
> 
> Many thanks...
> 
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to