what do you get for an exception?
Cheers,
Marc.
--
Blog: http://mguillem.wordpress.com
Harihara Vinayakaram wrote:
> I tried putting a the """
> and I am getting an error that says
>
>
> Cannot compile groovy code: def x = "null" println('xab is ' +x) if (x >
> 1) {
> ant.clickLink(xpath:'//[EMAIL
> PROTECTED]'mybreadcrumb']/div/div/div[1]/a[last()-1]',
> description:'Going to the previous page') } else {
> ant.clickLink(xpath:'//[EMAIL
> PROTECTED]'mybreadcrumb']/div/div/div[1]/a[last()]',
> description:'Going to the previous page') }
>
> What I am trying to do is click on the last available link . last()-1
> xpath evaluation fails if there is only one link
>
> any other solution would be appreciated
>
> Regards
> Hari
>
> On Fri, May 16, 2008 at 2:25 PM, Marc Guillemot <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> the problem here is the evaluation order that is not natural: your
> > def x = "${ant.project.properties.'xab'}"
> > println('xab is ' +x)
>
> is evaluated before the test is executed.
>
> You can change it to:
> groovy """
> def x = "${ant.project.properties.'xab'}"
> println('xab is ' +x)
> """
>
> in order to get it evaluated from WebTest during test execution.
> Ideally, we need something like
> doInWebTest {
> def x = "${ant.project.properties.'xab'}"
> println('xab is ' +x)
> }
> but nobody has proposed a patch for that ;-(
>
> Cheers,
> Marc.
> --
> Blog: http://mguillem.wordpress.com
>
>
> Harihara Vinayakaram wrote:
> > Hi
> > I am trying to do the following and println always get null .
> But the
> > result of storeXPath is showing the value correctly (in the result
> file
> > ). The propertyType is the default which I guess is ant
> >
> > Can somebody point me to the syntax of accessing the property
> >
> > storeXPath(xpath:
> > 'count(//[EMAIL
> PROTECTED]'mybreadcrumb\']/div/div/div[1]/a)',property:'xab')
> > def x = "${ant.project.properties.'xab'}"
> > println('xab is ' +x)
> >
> >
> > Regards
> > Hari
>
> _______________________________________________
> WebTest mailing list
> [email protected] <mailto:[email protected]>
> http://lists.canoo.com/mailman/listinfo/webtest
>
>
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest