[Webtest] [webtest][JIRA] Closed: (WT-346) storeXPath is not working
correctly in ant macro
Marc Guillemot (JIRA)
Marc Guillemot (JIRA)" <noreply@canoo.com
Fri, 9 Nov 2007 11:56:13 +0100 (CET)
[ http://webtest-community.canoo.com/jira/browse/WT-346?page=all ]
Marc Guillemot closed WT-346:
-----------------------------
Resolution: Invalid
You're usage is incorrect: you've forgotten the quotes.
With this macro definition, you should call
<test value="'abc'" />
or change the macro definition to
...
<storeXPath xpath="//a[contains(., '@{value}')]" property="search_result" />
...
> storeXPath is not working correctly in ant macro
> ------------------------------------------------
>
> Key: WT-346
> URL: http://webtest-community.canoo.com/jira/browse/WT-346
> Project: WebTest
> Type: Bug
> Environment: webtest R_1632, ant 1.6.5, Windows XP
> Reporter: Thomas Schrader
>
> storeXPath does not work correctly within a macro (see code below). The same xpath statement is used within the macro and outside. The parameter is passed correctly to the macro (tested with an echo statement within the macro) but it seams the the parameter is not correctly used within the macro or that the context used from storeXPath has changed. No result is found within the macro.
> <macrodef name="test">
> <attribute name="value"/>
> <sequential>
> <storeXPath xpath="//a[contains(.,@{value})]" property="search_result" />
> <echo message="... result:#{search_result}" />
> </sequential>
> </macrodef>
> <storeXPath xpath="//a[contains(.,'Verwaltung')]" property="search_result" />
> <echo>------- Test1:#{search_result}</echo>
> <test value="abc" />
> <echo>------- Macro Test:#{search_result}</echo>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira