A strange thing happened when i was trying to run QTP tests from Quality Center , there was this error message popped up after every test run.
Until the message box was not closed manually QC would wait indefinitely, defeating the whole purpose of automation.
So here is the vbcript that would run indefinitely waiting for the popup; and close it for tests to continue:
Set wshShell = CreateObject("WScript.Shell")
Do
ret = wshShell.AppActivate("System Settings Change")
If ret = True Then
wshShell.SendKeys "%N"
Exit Do
End If
WScript.Sleep 500
Loop
Until the message box was not closed manually QC would wait indefinitely, defeating the whole purpose of automation.
Set wshShell = CreateObject("WScript.Shell")
Do
ret = wshShell.AppActivate("System Settings Change")
If ret = True Then
wshShell.SendKeys "%N"
Exit Do
End If
WScript.Sleep 500
Loop
0 comments:
Post a Comment