[Webtest] [webtest][JIRA] Created: (WT-346) storeXPath is not working correctly in ant macro

Thomas Schrader (JIRA) Thomas Schrader (JIRA)" <noreply@canoo.com
Fri, 9 Nov 2007 11:47:13 +0100 (CET)


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