cancel
Showing results for 
Search instead for 
Did you mean: 

Using the word 'test' in my script for parsing results prevents the script from working correctly

MegO
Contributor

Using the word 'test' in my script for parsing results prevents the script from working correctly

Hi all,

 

I have a script I am using to parse test results at the end of a test run, these are then put into an email and emailed out. The difficulty I am having is that when I attempt to use the 'error test count' instead of 'error count' no values are returned in my table.

 

My script that works:

 

var errC = VarToInteger(xDoc.selectSingleNode('Nodes/Node[@name="root"]/Prp[@name="error count"]/@value').text);  

 

My script that doesn't work:

 

var errC = VarToInteger(xDoc.selectSingleNode('Nodes/Node[@name="root"]/Prp[@name="error test count"]/@value').text);  

 

If anyone could help me with this it would be much appreciated.

 

These are the values I am trying to retrieve:

 

<Prp name="error count" type="I" value="8"/>

<Prp name="error test count" type="I" value="1"/>

 

Kind regards,

 

Megan

1 REPLY 1
Marsha_R
Community Hero

Re: Using the word 'test' in my script for parsing results prevents the script from working correctl

Try it with some nonsense word in there, like "error zebra count".  Maybe "test" is showing up as a keyword somehow. 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors