How to invoke an url using ant
How can I invoke an url using ant ? I am using a macro defined as :
<macrodef name="open-url">
<sequential>
<invoke description="Login Page" url="someurl" />
</sequential>
&开发者_Python百科lt;/macrodef>
and in my build file:
<property name="parent-folder" value="../../../.././" />
<import file="open-url.xml"/>
<import file="${parent-folder}/sub-build"/>`
<target name="test" depends="xyz">`
<!-- do something-->`
</target>`
in sub-build:
<target name="xyz">
<ant antfile="open-url.xml" target="open-url"/>
</target>
The build and macro is in the same folder and sub-build is in parent folder.
I am unable to invoke the url.
You cannot do this with ant. Even BSF supported languages do not work since an ant build.xml file is not a browser window hence functions like XMLHttpRequest() will not work. Other than writing your own custom task I don't see how you could accomplish your task.
精彩评论