How to add / change executionInformation

Ask general questions here.
davyb
Posts: 6
Joined: Wed Sep 04, 2013 12:58 pm

How to add / change executionInformation

Post by davyb » Fri Oct 25, 2013 2:33 pm

In the xsl template there is a possibility to add or change execution information (e.g to add the version of a browser) via the "<xsl:template name="executionInformation"><div class="execution-information">"

The final report is then filled up with data from the *.rxlog.data file
Now i've added the field 'browserversion' in the report template, but how can i get this field filled upon execution of my tests?

Thx

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to add / change executionInformation

Post by Support Team » Wed Oct 30, 2013 6:35 pm

Hello,

The easiest way would be to use a global parameter in order to show the Browser version in the header.
You can access the global parameter within the *.xsl file as shown in the code snippet below.
<tr>
	<xsl:if test="//params/param[@name='MyGlobalParam']">     
	  <td>
		<i class="field">
		  MyGlobalParam<b>
		  <xsl:value-of select="//params/param[@name='MyGlobalParam']"/>
		  </b>
		</i>
	  </td>        
	</xsl:if>
</tr>
Regards,
Bernhard

davyb
Posts: 6
Joined: Wed Sep 04, 2013 12:58 pm

Re: How to add / change executionInformation

Post by davyb » Thu Oct 31, 2013 3:31 pm

Hi Bernhard

Thx for putting me on the right track!

I still have to adapt some other stuff as well (e.g to not show these values duplicate within the Global Parameter section, but I think I'll manage that...)
I already figured out this:
<xsl:template match="param|field">
		<td>
			<xsl:if test="not(./@name='Browser') and not(./@name='BrowserVersion')">
			<xsl:value-of select="./@name"/>: 
			<b><xsl:value-of select="."/></b>
			</xsl:if> 
		</td>
	</xsl:template>
Now trying to avoid the empty spaces ;p...

Thx!