Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Restart the script in qtp
#1
Solved: 10 Years, 10 Months ago
Hi Guys,
Below is the my sample script:
Code:
‘Look for .txt file
Set fso = CreateObject("Scripting.FileSystemObject")
s1=fso.FileExists("C:\temp\Test_Config.txt")
do While s1 <> "True"
      Wait(20)
    s1=fso.FileExists("C:\temp\Test_Config.txt")
Loop
‘Read from the file
Const ForReading = 1
Set fso = CreateObject("Scripting.FileSystemObject")
    s2="C:\temp\SmokeTest_Config.txt"
   Set theFile = fso.OpenTextFile(s2, ForReading, False)
   Do While theFile.AtEndOfLine <> True
      retstring = theFile.ReadLine
      Loop
   theFile.Close

URL ="http://google.com/"
userName ="xyz"

Call Website()
'Call Login ()

Function Website()
Script
End Function

Function Login ()
Script
End Function

Script to delete the txt file

How can i restart the script using loop?
Reply
#2
Solved: 10 Years, 10 Months ago
Never mind everybody. Found the solution. I'm doing loop in vbs script that i'm using for schedular.

Thanks for looking into the problem.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to close/restart UFT in "Not responding" status with AOM script CharlieMadrid 0 1,065 05-21-2020, 08:46 PM
Last Post: CharlieMadrid

Forum Jump:


Users browsing this thread: 1 Guest(s)