General Web Control Properties, Methods, and Events
A base set of properties, methods, and events apply to controls created through interrogation of web applications. Definitions of these properties, methods, and events are provided in the table below. Additional properties, methods, and events are exposed based on the target type.
Properties
Property |
Description |
BoundsRectangle |
Gets the size and location of the control including its non-client elements, in pixels, relative to the parent control. |
ClientRectangle |
Gets the rectangle that represents the client area of the control. |
Enabled |
Gets or sets the enabled state of the control. Set to True to enable the control. Type: Boolean. |
ElementID |
Gets the element ID attribute. |
FullName |
Gets the fully-qualified name of the control, such as Training.Product_Summary. Type: String. |
HtmlID |
Gets the string identifying the control. |
InnerHtml |
Gets or sets the HTML between the start and end tags of the control. |
InnerText |
Gets or sets the text between the start and end tags of the control. |
IsCreated |
Indicates whether the control has been created (matched). For more information, see Wait For Create. |
IsDisposed |
Included as part of system references. This property is not used in automations. |
Key |
Gets or sets the unique key value for the control. This property is used for applications that contain cloned targets. For more information, see Cloned Controls. Type: String |
MaskEventText |
See the Configure Monitored Events topic for more information. |
MaskEventValue |
See the Configure Monitored Events topic for more information. |
Name |
Gets or sets the name assigned to the control. |
NextKey |
Gets or sets the key value that will be assigned to the next clone created of this type. This property is used for applications that contain cloned targets. For more information, see Cloned Controls. Type: String |
OuterHtml |
Gets or sets the control and its content in HTML. |
ScreenRectangle |
Gets the rectangle that represents the screen area of the control. |
TagName |
Gets or sets the tag name of the control. |
TargetName |
Gets the target name of the control. |
TargetType |
Gets assembly and type for the control, such as OpenSpan.Adapters.Web.HtmlElement. Type: TargetType. |
Text |
Gets or sets the contents of the control as a string. |
This |
Gets a reference to the control object. |
Timeout |
Gets or sets the timeout interval for the Created event. For more information, see Wait For Create. |
UniqueID |
Gets the identity of the control, for example, WebAdapter-8CC89DAD9090962\WebControl-8CC89DB19805EE6. |
UseElementID |
Sets a Boolean value that indicates whether the ElementID for the control is used for matching. Set to False to disable using the ElementID when matching the control. |
UseKeys |
Use this property to specify whether clones of this control can be created when multiple matching targets are found. For more information, see Cloned Controls. Set to True to enable creating clones. The default is False. Type: Boolean. |
Visible |
Gets or sets a Boolean value that indicates whether the content of the control is displayed. |
WaitHandle |
Gets the WaitHandle value for the control. A control's WaitHandle is a signal that is turned on when a control is created and off when the control is destroyed. The WaitHandle allows callers to wait for the component's creation signal when using the WaitAny or WaitAll components. For more information, see WaitAny and WaitAll Components. |
Methods
Method |
Descriptions |
Parameters |
Result |
DestroyTooltip |
Deletes a tool tip from a control to which it has been assigned. |
None |
Void |
Detach |
Un-matches this control from the target that it is matched to. This method is used when an automation might need to force a control to un-match before calling the Rematch or RematchChildren method to re-match controls. Note: Rematch or RematchChildren should only be used when there is an issue that prevents matching from working correctly. |
None |
Void |
Disable |
Disables the control so the user cannot interact with it. |
None |
Void |
Enable |
Enables the control for user interaction, if it was previously disabled. |
None |
Void |
Focus |
Causes the control to receive the focus and executes the code specified by the GotFocus event. |
None |
Void |
GetClones |
Returns a collection of cloned objects. Use the GetClones method in combination with a ListLoop component to iterate over the list of cloned objects to extract individual list items. |
None |
CloneCollection |
GetEvent |
Initiates downstream logic pending the occurrence of a particular event . Click the Name parameter in the GetEvent design block to view a list of events applicable for the control. Select the event, and then create a proxy from the GetEvent result. For more information, see Get Event for Windows Controls and Forms. |
EventName name |
Event |
Hide |
Removes the control from view. For more information, see UnMatchOnHidden. Note: Avoid using this method when automating applications because some applications and controls must be on an active desktop and visible. |
None |
Void |
HideTooltip |
Causes the tool tip for the control to be hidden from view. |
None |
Void |
IsKeyAssigned |
Returns True if a key has been set for the control. This method applies when the UseKeys property is True, indicating that cloned controls are created for multiple target instances. For more information, see Cloned Controls. |
String key |
Boolean |
PerformClick |
Simulates a click by causing the Click event to fire. |
None |
Void |
PerformDoubleClick |
Simulates a double-click by causing the DoubleClick event to fire. |
None |
Void |
RaiseEvent |
Fires a specified event on the control. |
HtmlEvent evt |
Void |
Rematch |
Refreshes matching on the cell control and all controls under the cell. If the control is currently matched, Studio detaches (unmatches) the control and children before attempting to rematch. If the control is currently unmatched, you can only call Rematch if the parent is matched. |
Boolean |
Void |
RematchChildren |
Refreshes matching on all objects under the cell control. Set the detach property to True to unmatch all targets before attempting to rematch. |
Boolean detach
|
Void |
RemoveFocus |
Removes the focus from the control. |
None |
Void |
ResetState |
Reserved for .NET use. |
None |
Void |
SetNextKey |
Sets the key for the control when the UseKeys property is True, indicating that clones of this control can be created when multiple matching targets are found. For more information, see Cloned Controls. |
String key |
Void |
Show |
Makes the control visible after the Hide method has been called. See UnMatchOnHidden to understand how hiding an application changes control matching. |
None |
Void |
ShowTooltip |
Creates a tool tip for the control. There are five overloads of this method (1, 2, 3, 5, 7 parameters). For more information, see Using the ShowToolTip Method. |
String text, String title, ToolTipAnchorPosition anchorPosition, Color textColor, Color backgroundColor, Int32 maxWidth, ToolTipIcon icon |
Void |
WaitForCreate |
Waits for the control to be created (matched). Returns True if the cell is created before the WaitTimeout period elapses. Otherwise, it returns False. For more information, see Wait For Create. |
None |
Boolean |
WaitForCreate (1 param) |
Waits for the control to be created (matched). Returns True if the cell is created before the specified number of milliseconds has elapsed. Otherwise, it returns False. For more information, see Wait For Create. |
Int32 milliseconds |
Boolean |
Events
Note: The events for HTML elements (except for Clicking, DoubleClicking, Created, and Destroyed) are all asynchronous for performance reasons. Cancelling an event for a web control depends on the control. If the control has an inline event handler (onclick=”submitform()”). Setting the Cancel property will not cancel it. If, however, the control is a link or a Submit button which executes actions without a script, such as navigating to a link or submitting the form, setting the Cancel property to True will cancel these actions.
Event |
Description |
Click |
Occurs when the user clicks anywhere on the control. |
Clicking |
Occurs while the user clicks anywhere on the control. |
Copy |
Occurs when the text in the control has been copied by either the Ctrl+C keystroke sequence or when selected as a menu option. This event is also triggered when the Cut event occurs. When the Cut command is used (Ctrl+X or menu option), the Copy event fires and then the Cut event fires. Unlike Windows controls, for web controls the Copy event block drop-down arrow does not expose the Text parameter. Note: This event is not available for all application types. For more information, see Supported Application Technologies. |
Created |
Occurs when the control is matched. For more information, see Wait For Create. |
Cut |
Occurs when the text in the control has been cut by either the Ctrl+X keystroke sequence or when selected as a menu option. When the Cut command is used (Ctrl+X or from the menu option), the Copy event fires and then the Cut event fires. Unlike Windows controls, for web controls the Cut event block drop-down arrow does not expose the Text parameter. Note: This event is not available for all application types. For more information, see Supported Application Technologies. |
Destroyed |
Occurs when the control is unmatched. |
Disposed |
Occurs when the control is disposed by a call to the Dispose method. |
DoubleClick |
Occurs when the user double-clicks anywhere on the control. |
DoubleClicking |
Occurs while the user double-clicks anywhere on the control. |
GotFocus |
Occurs when focus is given to the control. |
Hidden |
Occurs when the Hide method is called on the control. |
InnerHtmlChanged |
Occurs when the application uses the InnerHtml property to change the content of an element via Javascript. |
InnerTextChanged |
Occurs when the application uses the InnerText property to change the content of an element via Javascript. |
KeyDown |
Occurs when one or more keys are pressed while the control is in focus. For more information, see KeyDown and KeyUp Events. |
KeyPress |
Occurs when a key is pressed while the control has focus – triggered after the KeyDown event. For more information, see KeyPress Event. |
KeyUp |
Occurs when one or more keys are released while the control is in focus. For more information, see KeyDown and KeyUp Events. |
LostFocus |
Occurs when focus has left the control. |
MouseDown |
Occurs when the user clicks the control with either mouse button. |
MouseUp |
Occurs when the user releases a mouse button while the mouse is over the control. |
Paste |
Occurs when the text in the control has been pasted from the Windows Clipboard by either the Ctrl+V keystroke sequence or when selected as a menu option. Unlike Windows controls, for web controls the Paste event block drop-down arrow does not expose the Text parameter. Note: This event is not available for all application types. For more information, see Supported Application Technologies. |
Shown |
Occurs when the Show method is called on the control. |
TextChanged |
Occurs when the Text property has changed. |
VisibilityChanged |
Occurs when the Visible property has changed. |
Privacy | Trademarks | Terms of Use | Feedback
Updated: 18 June 2020
© 2016 - 2020 Pegasystems Inc. Cambridge, MA All rights reserved.