Hello,

Solution :

Dim FSO , objFile1,FilePath
FilePath="C:\Documents and
Settings\cputtahonnappa\Desktop\121009TestCase.txt"

        set objFSO = CreateObject("Scripting.FilesystemObject")
        set objFile1 = objFSO.opentextfile(FilePath,1)
        readtext=objFile1.ReadAll    'Read file contents

        TextValue=Split(readtext,VBNewLine)
        'Msgbox ubound(TextValue)
        For i=0 to ubound(TextValue)
         If Instr(1,TextValue(i),"Fail") >0 Then
          'Msgbox TextValue(i)
          Cases=Cases + TextValue(i)
          'FailedCases=Cases + TextValue(i)
         End If
        Next

      Print  Cases

        Set objFSO=Nothing
        Set objFile1=Nothing

Regards,
Chethana
On Mon, Oct 15, 2012 at 3:30 PM, udhaya kumar <[email protected]>wrote:

> Hi All,
>
>
>              i have attached text file which has pass and fail lines. I
> want to read each fail lines and i want to store it in single variable.
>
>
>
> Please Help me in this,
>
>
> Thanks,
> Udhay
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to