''''''''''''''''<<<<--------写日志文件到C盘
Dim num
Public Sub WriteLineToFile(message)
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fileSystemObj, fileSpec
Dim currentTime
environment.Value("Num_count")=environment.Value("Num_count")+1
currentDate = Date
currentTime = Time
testName = "qtplog"
Set fileSystemObj = CreateObject("scripting.FileSystemObject")
fileSpec ="C:\" &testName& ".txt"
If Not (fileSystemObj.FileExists(filespec)) Then
Set logFile = fileSystemObj.CreateTextFile(fileSpec, ForWriting, True)
logFile.WriteLine ("<监护坐席>片段处理记录信息如下:创建文件时间"&now()&"")
'logFile.WriteLine (currentDate & currentTime & " Test: " & environment.Value("TestName") )
logFile.WriteLine ("#######################################################################")
logFile.Close
Set logFile = Nothing
End If
Set logFile = fileSystemObj.OpenTextFile(fileSpec, ForAppending, False, True)
logFile.WriteLine (" 第"&environment.Value("Num_count")&"条片段处理信息-----》"&message&"")
logFile.Close
Set logFile = Nothing
Set fileSystemObj = Nothing
End Sub
'''''''''---------------------->>>>>>>>>>>结束日志
Dim num
Public Sub WriteLineToFile(message)
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fileSystemObj, fileSpec
Dim currentTime
environment.Value("Num_count")=environment.Value("Num_count")+1
currentDate = Date
currentTime = Time
testName = "qtplog"
Set fileSystemObj = CreateObject("scripting.FileSystemObject")
fileSpec ="C:\" &testName& ".txt"
If Not (fileSystemObj.FileExists(filespec)) Then
Set logFile = fileSystemObj.CreateTextFile(fileSpec, ForWriting, True)
logFile.WriteLine ("<监护坐席>片段处理记录信息如下:创建文件时间"&now()&"")
'logFile.WriteLine (currentDate & currentTime & " Test: " & environment.Value("TestName") )
logFile.WriteLine ("#######################################################################")
logFile.Close
Set logFile = Nothing
End If
Set logFile = fileSystemObj.OpenTextFile(fileSpec, ForAppending, False, True)
logFile.WriteLine (" 第"&environment.Value("Num_count")&"条片段处理信息-----》"&message&"")
logFile.Close
Set logFile = Nothing
Set fileSystemObj = Nothing
End Sub
'''''''''---------------------->>>>>>>>>>>结束日志