Forum Discussion
Hi Jarad,
Still am facing the issue. If possible please look in to this once again. Thanks in advance.
var tcount=0, pcount=0, fcount=0;
fso = new ActiveXObject( "Scripting.FileSystemObject" );
fin = fso.OpenTextFile( src, forReading );
while( !fin.AtEndOfStream )
{
var line = fin.ReadLine();
if( line == "" )
continue;
data = line.split( "\t" );
++tcount;
var st1 = data[1];
Log["Message"](st1);
if(st1==”Pass”)
++pcount;
else
++fcount;
}
Log["Message"]( pcount);
Log["Message"]( fcount);
Here the variable data[1] is bringing the right value from the note pad. Using the statement “Log["Message"](st1);” I can able to c the result in the log report. While doing string comparison it is not going inside to the if loop.
Log["Message"](st1); - Displaying the report in test log as
Pass
Pass
Fail
0
0
Always the pcount and fcount both are showing as Zero.
It should be
2
1
To open the file am using ActiveXObject. I couldn’t catch the problem. Please help me.