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 ActivateActivates the SAP window.
Common Method CaptureBitmapSaves a screen capture of the object as a .png or .bmp image using the specified file name.
Common Method CheckChecks whether the actual value of an item matches the expected value.
Common Method CheckPropertyChecks whether the actual value of the specified object property matches the specified expected value within the specified timeout.
Common Method ChildObjectsReturns the collection of child objects contained within the object.
Common Method GetAllROProperties

Returns the collection of properties and current values from the object in the application.

Method CloseCloses the window or dialog box in an SAP GUI for Windows application.
Common Method GetROPropertyReturns the current value of the description property from the object in the application.
Common Method GetTOPropertiesReturns the collection of properties and values used to identify the object.
Common Method GetTOPropertyReturns the value of the specified description property from the test object description.
Common Method HighlightHighlights the object in the application.
Method HorizontalScrollbarPositionSets the position of the horizontal scroll bar. (Moves the scroll bar to the left or right.)
Method MaximizeMaximizes the window or dialog box in an SAP GUI for Windows application.
Common Method OutputRetrieves the current value of an item and stores it in a specified location.
Common Method RefreshObjectInstructs UFT One to re-identify the object in the application the next time a step refers to this object.
Method ResizeResizes the window so that the available working area has the specified width and height in character metric.
Method RestoreRestores a maximized window or dialog box in an SAP GUI for Windows application to its original size.
Method SelectMenuItemByIdSelects an item from a pop-up (right-click) menu in an SAP GUI for Windows application.
Method SendKeyPresses a functional keyboard key.
Common Method SetTOPropertySets the value of the specified description property in the test object description.
Common Method ToStringReturns a string that represents the test object.
Method VerticalScrollbarPositionSets the position of the vertical scroll bar. (Moves the scroll bar up or down.)
Common Method WaitPropertyWaits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.

Properties

Common Property ExistChecks whether the object currently exists in the open application.
Common Property ObjectAccesses 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

ParameterDescription
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

ParameterDescription
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

ParameterDescription
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

ParameterDescription
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

ParameterDescription
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: