Tuesday, February 23, 2010

Make Your QTP Script Talk

This is soooo... interesting one in QTP....

QTP will talk????

I read about it in some blog and tested in my system.. QTP is talking..... now.. wow...

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

With this code.. Now your QTP will Speak :)..which Iteration is running in your current execution..

switch on the speakers and listen..

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

0 comments: