3

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>
</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.

matt
  • 78,533
  • 8
  • 163
  • 197
sachin
  • 665
  • 3
  • 8
  • 15

1 Answers1

1

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.

FailedDev
  • 26,680
  • 9
  • 53
  • 73