Object Model Reference for GUI Testing > SAP Gui for Windows > Activate Method

SAPGuiWindow Object

Description

A window or dialog box containing objects in an SAP GUI for Windows application.

Operations

The sections below list the built-in methods and properties that you can use as operations for the SAPGuiWindow object.

Note: You can also view a list and descriptions of the SAPGuiWindow description properties, for use in object repository descriptions, programmatic descriptions, checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods.

Methods

Method Activate Activates the SAP window.
Common Method CaptureBitmap Saves a screen capture of the object as a .png or .bmp image using the specified file name.
Common Method Check Checks whether the actual value of an item matches the expected value.
Common Method CheckProperty Checks whether the actual value of the specified object property matches the specified expected value within the specified timeout.
Common Method ChildObjects Returns the collection of child objects contained within the object.
Method Close Closes the window or dialog box in an SAP GUI for Windows application.
Common Method GetROProperty Returns the current value of the description properties from the object in the application.
Common Method GetTOProperties Returns the collection of properties and values used to identify the object.
Common Method GetTOProperty Returns the value of the specified description properties from the test object description.
Method HorizontalScrollbarPosition Sets the position of the horizontal scroll bar. (Moves the scroll bar to the left or right.)
Method Maximize Maximizes the window or dialog box in an SAP GUI for Windows application.
Common Method Output Retrieves the current value of an item and stores it in a specified location.
Common Method RefreshObject Instructs UFT to re-identify the object in the application the next time a step refers to this object.
Method Resize Resizes the window so that the available working area has the specified width and height in character metric.
Method Restore Restores a maximized window or dialog box in an SAP GUI for Windows application to its original size.
Method SelectMenuItemById Selects an item from a pop-up (right-click) menu in an SAP GUI for Windows application.
Method SendKey Presses a functional keyboard key.
Common Method SetTOProperty Sets the value of the specified description properties in the test object description.
Common Method ToString Returns a string that represents the test object.
Method VerticalScrollbarPosition Sets the position of the vertical scroll bar. (Moves the scroll bar up or down.)
Common Method WaitProperty Waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.

Properties

Common Property Exist Checks whether the object currently exists in the open application.
Common Property Object Accesses the native methods and properties of the object.

 

Back to top

Activate Method

Description

Activates the SAP window.

Syntax

object.Activate

Return Type

None.

Example


 

Back to top

Close Method

Description

Closes the window or dialog box in an SAP GUI for Windows application.

Syntax

object.Close

Return Type

None.

Example


 

Back to top

HorizontalScrollbarPosition Method

Description

Sets the position of the horizontal scroll bar. (Moves the scroll bar to the left or right.)

Syntax

object.HorizontalScrollbarPosition (Pos)

Arguments

Parameter Description
Pos Required. A long integer value.
The position where you want to place the horizontal scroll bar. Position values start from 0.

Return Type

None.

Example


 

Back to top

Maximize Method

Description

Maximizes the window or dialog box in an SAP GUI for Windows application.

Syntax

object.Maximize

Return Type

None.

Example


 

Back to top

Resize Method

Description

Resizes the window so that the available working area has the specified width and height in character metric.

Syntax

object.Resize (Width, Height)

Arguments

Parameter Description
Width Required. A long integer value.
The width (in characters) of the resized window.
Height Required. A long integer value.
The height (in characters) of the resized window.

Return Type

None.

IMPORTANT

This method uses the SAP API resizeWorkingPane function to resize the window.

Example


 

Back to top

Restore Method

Description

Restores a maximized window or dialog box in an SAP GUI for Windows application to its original size.

Syntax

object.Restore

Return Type

None.

Example


 

Back to top

SelectMenuItemById Method

Description

Selects an item from a pop-up (right-click) menu in an SAP GUI for Windows application.

Syntax

object.SelectMenuItemById (MenuItemId)

Arguments

Parameter Description
MenuItemId Required. A String value.
The ID of the pop-up menu item to be selected.

Return Type

None.

Example


 

Back to top

SendKey Method

Description

Presses a functional keyboard key.

Syntax

object.SendKey (Key)

Arguments

Parameter Description
Key Required. A long integer value.
The code representing a functional keyboard key. For example:
  • ENTER = Enter key
  • F1 - F11 = F1 - F11 keys
  • ESC = Esc key
  • SHIFT_F1 - SHIFT_F12 = Shift + F1 - Shift + F12 keys
  • CTRL_F1 - CTRL_F12 = Ctrl + F1 - Ctrl + F12 keys
  • CTRL_SHIFT_F1 - CTRL_SHIFT_F12 = Ctrl + Shift + F1 - Ctrl + Shift + F12 keys
  • PAGEDOWN, PAGEUP = Page Down, Page Up keys
  • CTRL_F = Ctrl + F keys
  • CTRL_G = Ctrl + G keys
  • CTRL_P = Ctrl + P keys
  • CTRL_PAGEDOWN= Ctrl + Page Down keys
  • CTRL_PAGEUP = Ctrl + Page Up keys

Return Type

None.

Example


 

Back to top

VerticalScrollbarPosition Method

Description

Sets the position of the vertical scroll bar. (Moves the scroll bar up or down.)

Syntax

object.VerticalScrollbarPosition (Pos)

Arguments

Parameter Description
Pos Required. A long integer value.
The position where you want to place the vertical scrollbar.

Return Type

None.

Example


Back to top

See also: