Function f_WriteToLogFile(text,LogMsg)
 Const ForAppending = 8
 Set oFSO = CreateObject("Scripting.FileSystemObject")

 'Check if file already exists. If not, create it.
 If oFSO.FileExists("D:\Akhalesh\Automation\AutomationLog.txt") = False Then
   Set oFile =
oFSO.CreateTextFile("D:\Akhalesh\Automation\AutomationLog.txt",True)
   Set oFile = Nothing
 End If

  Set oTxtFile =
oFSO.OpenTextFile("D:\Akhalesh\Automation\AutomationLog.txt", ForAppending,
True)
  oTxtFile.WriteLine  text &"       "&LogMsg &"  "&date()& " " & time()
End Function


Thanks...
Akhalesh


On Wed, Jan 29, 2014 at 2:50 AM, Raghavendra K <[email protected]> wrote:

>
> Hi All ,
>
> How to generate LOG files & where i need to place in the Framework ?
>
> --
> Thanks & Warm Regards
> Raghavendra.k
>
> --
> --
> 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 Groups
> "QTP - HP Quick Test Professional - Automated Software Testing" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Akhalesh yadav
+919555717928
+919310680659

-- 
-- 
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 Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to