Recently I am working on selenium webdriver 2.0 (developing automation framework). As per requirement for every faiulre the screenshot must be capture (file path and filename: ./screenshots/testcases/ddmmyyyy/scenario_hhmmss.png) however I already capture screenshots. when i run these entire test suite (I want to generate JUNIT report such that the repost must have screenshot link.)Now problem is that the screenshot path is generate dynamically (By selenium java code), and in Junit report i want to establish hyperlink to recently generated screenshots (i already updated frames-report.xslt file using we can create link but it was hardcoded)? Please suggest any way to do so?
Here is some part of my build.xml file
<target name="exec" depends="compile">
<delete dir="${report}" />
<mkdir dir="${report}" />
<mkdir dir="${report}/xml" />
<junit printsummary="yes" haltonfailure="no">
<classpath refid="project-classpath" />
<classpath>
<pathelement location="${bin}" />
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</classpath>
<test name="com.example.tests.NormanTestSuite" haltonfailure="no" todir="${report}/xml" outfile="TEST-result">
<formatter type="xml" />
</test>
</junit>
<junitreport todir="${report}">
<fileset dir="${report}/xml">
<include name="TEST*.xml" />
</fileset>
<report styledir="C:\apache-ant-1.8.4\custom" format="frames" todir="${report}/html" >
</report>
</junitreport>
</target>