Monday, April 6, 2009

Find Number of Actions in a Test


We can find cout of actions in open QTP test with the below code
.
' Create the Application object

Set QTPApp = CreateObject("QuickTest.Application")

ActionCount=QTPApp.Test.Actions.count
Msbgox "Number of Actions : " & ActionCount

we can open QTP script and find the no of actions with the below code.

' Create the Application object
Set QTPApp = CreateObject("QuickTest.Application")
' Launch QuickTest
QTPApp.Launch
' Set QuickTest to be visible

QTPAppVisible = True

' Open a test

QTPApp.Open "C:\Test1", False, False
msgbox QTPApp.Test.Actions.count

No comments:

Post a Comment