SapWindow Class

Description

SapWindow class is the class for a top-level window.

Inheritance Hierarchy

Syntax

C#
public class SapWindow : SapComponent, IMoveable
VB
'Declaration
Public Class SapWindow _
Inherits SapComponent _
Implements IMoveable

Properties

Name Description
AccessibilityText an additional text for accessibility support. (Inherited from SapComponent)
AccessibilityTextOnRequest an additional text for accessibility support. (Inherited from SapComponent)
AccessibilityTooltip an additional tooltip text for accessibility support. (Inherited from SapComponent)
ButtonbarVisible whether the application toolbar, the lower toolbar within SAP GUI, is visible.
Changeable whether an object is changeable. (Inherited from SapComponent)
DefaultTooltip the tooltip text which is generated from the short text defined in the data dictionary for the given screen element type. (Inherited from SapComponent)
GuiFocus the element within SAP GUI that currently has the focus.
Height the current height of the component. (Inherited from SapComponent)
IconName whether the object has been assigned an icon, then this property is the name of the icon, otherwise it is an empty string. (Inherited from SapComponent)
IsSymbolFont whether the component's text is visualized in the SAP symbol font. (Inherited from SapComponent)
Left the left position of the element in screen coordinates. (Inherited from SapComponent)
Modified whether the state has been changed by the user and this change has not yet been sent to the SAP system. (Inherited from SapComponent)
Name the name of the component. (Inherited from SapComponent)
ScreenLeft the left position of the component in screen coordinates. (Inherited from SapComponent)
ScreenTop the top position of the component in screen coordinates. (Inherited from SapComponent)
StatusbarVisible whether the statusbar is visible.
SystemFocus the element within SAP GUI that has the focus from the server application's perspective.
Text The text of the control. (Inherited from TestObject)
TitlebarVisible whether the titlebar is visible.
ToolbarVisible whether the toolbar is visible.
Tooltip the tooltip text. (Inherited from SapComponent)
Top the top coordinate of the element in screen coordinates. (Inherited from SapComponent)
Value The value of the control, e.g.: text in a text control. (Inherited from TestObject)
Width the current width of the component. (Inherited from SapComponent)
WindowHandle the window handle of the control that is connected to the GuiShell.
WindowState The state of a window. Values include: 1=minimized, 2=maximized, 3=restored (Inherited from IMoveable)
WorkingPaneHeight the current height of the working pane.
WorkingPaneWidth the current width of the working pane.

Methods

Name Description
CaptureBitmap Saves a bitmap image of this object to a file. If you do not specify an absolute file name, the bitmap is saved to the default bitmap location on the machine that runs the Agent, which is %LOCALAPPDATA%/Silk/SilkTest/capturedBitmaps. The captured bitmap's pixels are stored in 32bit RGB order; when parsing the image the 4th byte (alpha channel) of every pixel must be ignored as it is used only for padding. In .NET, the constant System.Drawing.Imaging.PixelFormat.Format32bppRgb can be used for this purpose. (Inherited from TestObject)
Close Closes the window. (Inherited from IMoveable)
CloseSynchron Closes the window and waits until the window is closed. (Inherited from IMoveable)
Exists Checks if any child object matching the locator exists for an object in the application under test. If the timeout parameter is passed the agent retries finding until the given timeout expires. If no timeout is specified and no object is found initially false is returned immediately. (Inherited from TestObject)
Exists Checks if an object exists in the application under test. (Inherited from TestObject)
Find Finds an object specified by an XPath locator. (Inherited from TestObject)
FindAll Finds all objects specified by an XPath locator. (Inherited from TestObject)
GenerateLocator Returns a locator for this object. (Inherited from TestObject)
GetChildren Returns the child objects of this object. (Inherited from TestObject)
GetCloseWindows Returns the windows that need to be closed in order so that only the main window of the application is open. (Inherited from IMoveable)
GetDynamicMethodList Returns a list of methods (including their signature) that can be dynamically invoked on this TestObject. (Inherited from TestObject)
GetFocus Returns the object with the input focus. (Inherited from IMoveable)
GetNextCloseWindow Returns the next window that need to be closed in order to close all windows of the application except the main window. (Inherited from IMoveable)
GetParent Looks up the parent of this object in the test application. (Inherited from TestObject)
GetProperty Returns the value of the specified property. (Inherited from TestObject)
GetPropertyList Returns a list of property names that can be retrieved for the given object. (Inherited from TestObject)
GetRect Returns the size and position of this object. Per default the returned coordinates are relative to the parent window that contains this object. (Inherited from TestObject)
HighlightObject Highlights this object. (Inherited from TestObject)
ImageClick Clicks on the specified image asset. (Inherited from TestObject)
ImageClickFile Clicks on the specified image. (Inherited from TestObject)
ImageExists Returns whether the specified image asset exists. (Inherited from TestObject)
ImageExistsFile Returns whether the specified image exists. (Inherited from TestObject)
ImageRectangle Returns the object-relative rectangle of the specified image asset. (Inherited from TestObject)
ImageRectangleFile Returns the object-relative rectangle of the specified image. (Inherited from TestObject)
Invoke Dynamically invokes a method on the test object. (Inherited from TestObject)
InvokeMethods Dynamically invokes a sequence of methods starting at this TestObject. (Inherited from TestObject)
IsActive Returns whether the window is set to active. (Inherited from IMoveable)
IsFocused Return whether the control has focus. (Inherited from IFocusable)
IsVkeyAllowed The method returns True if the given virtual key can be executed on the current screen.
JumpBackward Execute the Ctrl+Shift+Tab key on the window to jump backward one block.
JumpForward Execute the Ctrl+Tab key on the window to jump forward one block.
Maximize Maximizes the window. (Inherited from IMoveable)
Minimize Reduces the window to an icon. (Inherited from IMoveable)
Move Moves the window. (Inherited from IMoveable)
ResizeWorkingPane The ResizeWorkingPane function will resize the window so that the available working area has the given width and height in character metric.
ResizeWorkingPaneEx The ResizeWorkingPaneEx function will resize the window so that the available working area has the given width and height in pixels.
Restore Restores the window to its previous size. (Inherited from IMoveable)
SendVKey Send a virtual key to the system.
SetActive Makes the window active. (Inherited from IMoveable)
SetFocus Gives focus to the control. (Inherited from IFocusable)
SetProperty Sets the value of the specified property. (Inherited from TestObject)
ShowContextMenu Shows the context menu of the control. (Inherited from SapComponent)
Size Resizes the window. (Inherited from IMoveable)
StartScreenRecording Starts screen recording (Inherited from TestObject)
StopScreenRecording Stops screen recording (Inherited from TestObject)
TabBackward Execute the Shift+Tab key on the window to jump backward one element.
TabForward Execute the Tab key on the window to jump forward one element.
TextCapture Returns the text in this object's visible area. (Inherited from TestObject)
TextClick Clicks in the center of the specified text. (Inherited from TestObject)
TextExists Returns whether the specified text exists. (Inherited from TestObject)
TextRectangle Returns the object-relative rectangle of the specified text. (Inherited from TestObject)
Verify Executes a verification on the given asset in the context of this UI object. (Inherited from TestObject)
WaitForChildDisappearance Waits until the specified child object does not exist or until the timeout is reached. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForDisappearance Waits until the object does not exist or until the timeout is reached. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForObject Waits for an object that matches the specified locator. If no object matches within an timeout an ObjectNotFoundException is thrown. The default timeout is 5 seconds and you can change the timeout by setting the value of the option OPT_WAIT_RESOLVE_OBJDEF. Use WaitForObject if the AUT takes a long time to display a specific object, for example when a transaction is processed before showing any results. By default, an action in the UI does not require a WaitForObject, because of the built-in synchronization. If you receive random timeout errors during normal script execution, consider increasing the default timeout instead of adding WaitForObject statements to your scripts. (Inherited from TestObject)
WaitForProperty Waits until the specified property has the specified value or until the timeout is reached.If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForPropertyNotEquals Waits until the specified property has a value that is different to the specified value or until the timeout is reached.If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForScreenshotStable Waits until the control is visually stable and does not change its position, by comparing screenshots taken with the specified interval. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_SCREENSHOT_STABLE will be used. The default interval is 200 milliseconds. An exception is thrown if the timeout is reached. (Inherited from TestObject)