Archive for June, 2023
Getting Unique String in QTP
June 23, 2023
Leave a comment
Class clsString
Public Function fun_GetStringWithTimeStamp(strFristString)
strTime = Replace(Time(),”:”,””)
fun_GetStringWithTimeStamp = strFristString&strTime
End Function
End Class
data = RandomString(265)
WScript.Echo Len(data)
WScript.Echo data
Function RandomString( ByVal strLen )
Dim str
Const LETTERS = “abcdefghijklmnopqrstuvwxyz0123456789”
Randomize()
For i = 1 to strLen
RndNumber = Int((Len(LETTERS)- 1 + 1) * Rnd + 1)
str = str & Mid( LETTERS, RndNumber, 1 )
Next
RandomString = str
End Function
Class clsString
Public Function fun_GetStringWithTimeStamp(strFristString)
strTime = Replace(Time(),”:”,””)
fun_GetStringWithTimeStamp = strFristString&strTime
End Function
End Class
Categories: Quick Test Pro