Wednesday, April 8, 2009

Configure Quick Test Pro Views and Panes at Run time

We can Configure test pane view (ExpertView or KeywordView), Debug View, Data Table, Active Screen and we can maximize QTP Window with the below code.

Dim QTPApp
' Create Object for QTP application
Set QTPApp = CreateObject("QuickTest.Application")

' Launch QuickTest
QTPApp.Launch

' Display the Expert View
QTPApp.ActivateView "ExpertView"

' Display the Active Screen pane
QTPApp.ShowPaneScreen "ActiveScreen", True

' Displaye the Data Table pane
QTPApp.ShowPaneScreen "DataTable", True

' Display the Debug Viewer pane
QTPApp.ShowPaneScreen "DebugViewer", True

' Maximize the QTP Window
QTPApp.WindowState = "Maximized"

'Display the QTP Window
QTPApp.Visible = True ' Make the QuickTest window visible

wait(5)
' Release the Object
Set QTPApp = Nothing

No comments:

Post a Comment