Showing posts with label QTP Script Talk QTP Tricks QTP sapi. Show all posts
Showing posts with label QTP Script Talk QTP Tricks QTP sapi. Show all posts

Saturday, January 23, 2010

Make Your QTP Script Talk

Make your QTP script talk to you. Try the below code, the script will tell you the current iteration number. Before running the script, please switch on your PC's speakers.

Set oVoice = CreateObject("sapi.spvoice")
oVoice.Speak "Iteration "&Environment.Value("TestIteration")
Set oVoice =Nothing


Reference: http://en.wikipedia.org/wiki/Microsoft_Speech_API