Wednesday, 16 September 2015

UTILITY FUNCTIONS IN QTP


Utility Functions
SystemUtil.Run:
Description:
Runs a file or application.
Syntax:
object.Run file, [params], [dir], [op], [mode]

Object
A test object of type SystemUtil.
File
Required. A String value.
The name of the file you want to run.
Params
Optional. A String value.
If the specified file argument is an executable file, use the params argument to specify any parameters to be passed to the application.
Dir
Optional. A String value.
The default directory of the application or file.
Op
Optional. A String value. The action to be performed. If this argument is blank ( ""), the open operation is performed.

Mode:
Optional. An Integer value.
Specifies how the application is displayed when it opens. You can specify one of the modes in the table below.
Default = 1

Mode
Description
Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. Specify this flag when displaying the window for the first time.
Activates the window and displays it as a minimized window.
Activates the window and displays it as a maximized window.
Displays the window in its most recent size and position. The active window remains active.
Activates the window and displays it in its current size and position.
Minimizes the specified window and activates the next top-level window in the Z order.
Displays the window as a minimized window. The active window remains active.
Displays the window in its current state. The active window remains active.
Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. Specify this flag when restoring a minimized window.
10 
Sets the show-state based on the state of the program that started the application.

Subscribe  channel to get  latest video

No comments:

Post a Comment