SparkWindow Class

Description

The Window is a top-level container for additional windows in an AIR desktop application.

Inheritance Hierarchy

Syntax

'Declaration
Public Class SparkWindow _
Inherits SparkSkinnableContainer _
Implements IMoveable

Properties

Name Description
alpha the alpha transparency value of the object specified. (Inherited from FlexDisplayObject)
alwaysInFront a value whether the underlying NativeWindow is always in front of other windows.
autoLayout whether measurement and layout are done when the position or size of a child is changed. (Inherited from SparkSkinnableContainer)
automationClassName a string containing the automation class name for the element. (Inherited from FlexObject)
automationIndex a string containing the automation index for the element. (Inherited from FlexObject)
automationName the name that can be used as an identifier for this object. (Inherited from FlexObject)
className the name of this instance's class, such as Button. (Inherited from FlexObject)
closed a value whether the underlying window has been closed.
columnNames a list containing the names of all columns in the data. (Inherited from SparkSkinnableContainerBase)
creationPolicy the content creation policy for this component. (Inherited from SparkSkinnableContainer)
currentState the current view state of the component. (Inherited from FlexObject)
deferredContentCreated whether deferred content has been created. (Inherited from SparkSkinnableContainer)
enabled whether the component can accept user interaction. (Inherited from FlexObject)
errorColor the color of the component highlight when validation fails. (Inherited from FlexObject)
errorString the text that will be displayed by a component's error tip when a component is monitored and validation fails. (Inherited from FlexObject)
firstVisibleRow the index of the first visible child. (Inherited from SparkSkinnableContainerBase)
focusEnabled whether the component can receive focus when tabbed to. (Inherited from FlexObject)
height the height of the display object, in pixels. (Inherited from FlexDisplayObject)
id the ID of the component. (Inherited from FlexObject)
isAIRWindow a value whether this window is an AIR window.
lastVisibleRow the index of the last visible child. (Inherited from SparkSkinnableContainerBase)
maxHeight The maximum recommended height of the component to be considered by the parent during layout.
maximizable a value whether the window can be maximized.
maxWidth The maximum recommended width of the component to be considered by the parent during layout.
minHeight The minimum recommended height of the component to be considered by the parent during layout.
minimizable a value whether the window can be minimized.
minWidth The minimum recommended width of the component to be considered by the parent during layout.
mouseEnabled whether this object receives mouse messages. The default value is true, which means that by default any InteractiveObject instance that is on the display list receives mouse events. If mouseEnabled is set to false, the instance does not receive any mouse events. Any children of this instance on the display list are not affected. To change the mouseEnabled behavior for all children of an object on the display list, use flash.display.DisplayObjectContainer.mouseChildren. (Inherited from FlexDisplayObject)
numAutomationChildren the number of automation children this container has. (Inherited from FlexObject)
numColumns the total number of columns in the data available. (Inherited from SparkSkinnableContainerBase)
numElements The number of visual elements in this container. (Inherited from SparkSkinnableContainer)
numRows the total number of rows of data available. (Inherited from SparkSkinnableContainerBase)
percentHeight the number that specifies the height of a component as a percentage of its parent's size. (Inherited from FlexObject)
percentWidth the number that specifies the width of a component as a percentage of its parent's size. Allowed values are 0-100. The default value is NaN. Setting the width or explicitWidth properties resets this property to NaN. (Inherited from FlexObject)
resizable a value whether the window can be resized.
scaleX the number that specifies the horizontal scaling factor. (Inherited from FlexObject)
scaleY the number that specifies the vertical scaling factor. (Inherited from FlexObject)
showStatusBar a value whether the status bar is visible.
status The string that appears in the status bar, if it is visible.
systemChrome the type of system chrome (if any) the window has.
tabChildren whether the children of the display object are tab enabled. The default is true. (Inherited from FlexDisplayObject)
tabEnabled whether this object is in the tab order. (Inherited from FlexDisplayObject)
tabIndex the tab ordering of objects in a SWF file. (Inherited from FlexDisplayObject)
Text The text of the control. (Inherited from TestObject)
themeColor the theme color of a component. (Inherited from FlexObject)
title The title that appears in the window title bar and the taskbar.
toolTip the text to display in the ToolTip. The default value is Nothing. (Inherited from FlexObject)
transparent a value whether the window is transparent.
useHandCursor whether the pointing hand cursor appears when the mouse rolls over an element. The default value is true. If useHandCursor is false, the arrow pointer is used instead. (Inherited from FlexObject)
Value The value of the control, e.g.: text in a text control. (Inherited from TestObject)
visible whether the display object is visible. (Inherited from FlexDisplayObject)
width the width of the display object, in pixels. (Inherited from FlexDisplayObject)
WindowState The state of a window. Values include: 1=minimized, 2=maximized, 3=restored (Inherited from IMoveable)
x the x coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer. (Inherited from FlexDisplayObject)
y the y coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer. (Inherited from FlexDisplayObject)

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)
ChangeFocus Changes the current focus. (Inherited from FlexObject)
Click Clicks on the object. (Inherited from IClickable)
Close Closes the window. (Inherited from IMoveable)
CloseSynchron Closes the window and waits until the window is closed. (Inherited from IMoveable)
DoubleClick Double-clicks a mouse button on the object. (Inherited from IClickable)
DragCancel Dispatched when a drag operation is cancelled. (Inherited from SparkSkinnableContainerBase)
DragDrop Dispatched when the dragged item is dropped. (Inherited from SparkSkinnableContainerBase)
DragStart Dispatched when the drag/drop operation begins. (Inherited from SparkSkinnableContainerBase)
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)
GetStyle Returns the style value for the given style. For available styles consider the Apache Flex sdk documentation. (Inherited from FlexDisplayObject)
GetValues Returns a matrix containing the automation values of all parts of the components. (Inherited from SparkSkinnableContainerBase)
HighlightObject Highlights this object. (Inherited from TestObject)
ImageClick Clicks on 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)
Maximize Maximizes the window. (Inherited from IMoveable)
Minimize Reduces the window to an icon. (Inherited from IMoveable)
MouseMove Moves the pointer to the specified location in the object. This method is not supported for mobile Web applications. (Inherited from IClickable)
Move Moves the component to a specified position within its parent. Calling this method is the same as setting the component's x and y properties. (Inherited from IMoveable)
PressKeys Presses (but does not release) a set of keys or mouse buttons. (Inherited from IKeyable)
PressMouse Presses (but does not release) a mouse button in the object. This method is not supported for mobile Web applications. (Inherited from IClickable)
ReleaseKeys Releases a set of keys or mouse buttons. (Inherited from IKeyable)
ReleaseMouse Releases a mouse button. This method is not supported for mobile Web applications. (Inherited from IClickable)
Restore Restores the window to its previous size. (Inherited from IMoveable)
SetActive Makes the window active. (Inherited from IMoveable)
SetFocus Sets the focus to this component. The component may in turn pass focus to a subcomponent. (Inherited from FlexObject)
SetProperty Sets the value of the specified property. (Inherited from TestObject)
Size Resizes the window. (Inherited from IMoveable)
StartScreenRecording Starts screen recording (Inherited from TestObject)
StateChange Dispatched when the displaystatus of the window is changed.
StopScreenRecording Stops screen recording (Inherited from TestObject)
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)
ToString Returns a string representation of the control. (Inherited from FlexDisplayObject)
TypeKeys Sends a set of keystrokes to the object. (Inherited from IKeyable)
TypePasswordKeys Types an encrypted password into an object, for example a text field. (Inherited from IKeyable)
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)