Web Page Properties, Methods, and Events
Studio creates WebPage controls for interrogated web page targets webpages. The actual control that is created as a result of interrogating a webpage is the HtmlDocument control. For simplicity, the control is referred to as the WebPage control. The WebPage control supports the general control properties, methods, and events described in General Web Control Properties Methods Events. In addition, Studio exposes properties, methods, and events specific to the WebPage control.
Note: Design properties are accessed from the Properties Grid. Access all other properties, methods and events directly from Object Explorer or by using the Configure Type option in Object Inspector.
Properties |
Descriptions |
Type |
ActiveLinkColor |
Gets or sets the color of a hyperlink when clicked by a user. |
Color |
All |
Gets a collection of all the HTML elements contained in the webpage. |
WebControlCollection |
BackColor |
Gets or sets the background color of the HTML document. |
Color |
Cookie |
Gets or sets the HTTP cookies associated with this document. |
String |
Domain |
Gets or sets the string describing the domain of this document for security purposes. |
String |
Focused |
Gets a value that indicates whether the document has user input focus. |
Boolean |
ForeColor |
Gets or sets the text color for the document. |
Color |
Forms |
Gets a collection of all of the <FORM> elements in the document. |
FormCollection |
Images |
Gets a collection of all image tags in the document. |
ImageCollection |
LinkColor |
Gets or sets the color of hyperlinks. |
Color |
Links |
Gets a list of all the hyperlinks within this HTML document. |
LinkCollection |
StatusBarText |
Gets the status text of the webpage. |
String |
Title |
Gets or sets the text value of the <TITLE> tag in the current HTML document. |
String |
URL |
Gets the URL describing the location of this document. |
String |
VisitedLinkColor |
Gets or sets the color of links to HTML pages that the user has already visited. |
Color |
WindowPosition |
Gets the location of the page (in points). |
Point |
Methods |
Description |
Parameters |
Return Type |
Alert (1 param) |
Displays a message box. Use the Message parameter to enter the text to display in the alert. |
String Message |
Void |
CloseWindow |
Closes the page. |
None |
Void |
Confirm (1 param) |
Displays a dialog with a message and buttons to solicit a Yes/No response. Use the Message parameter to enter the text string displayed in the Confirm window. |
String Message |
Boolean |
Detach |
Unmatches the Page control. |
None |
Void |
ExecuteScript (2 params) |
Executes the script you specify. Use the Script parameter to enter the script as a text string. Use the Language parameter to indicate the script type. You should indicate either JavaScript or VBScript as the language unless you know that another scripting language is installed. For more information, see Execute Script vs Invoke Script. |
String, String |
Void |
FocusWindow |
Sets user input focus on the current document. |
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 (1 param) |
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 component . Select the event and then create a proxy from the GetEvent result. For more information, see Get Event for Windows Controls and Forms. |
EventName |
Event |
InvokeScript (2 params) |
Invokes a script defined in a webpage and returns the result from the script. Input the script name as a parameter and the parameters for the script as an Object[] parameter. For more information, see Execute Script vs Invoke Script. |
String, Object[] |
Object |
IsKeyAssigned (1 param) |
Verifies that the key is assigned. |
String key |
Boolean |
MoveWindow (1 param) |
Moves the window to the specified coordinates on the screen. Use the Point parameter to set the location. |
Point |
Void |
MoveWindow (2 params) |
Moves the window to the specified coordinates on the screen. Use the X and Y coordinate parameters to set the location. |
Int32, Int32 |
Void |
Prompt (2 params) |
Shows a dialog that displays a message and a text box to the user. Use the Message parameter to specify the text to display. Use the Default Value parameter to set the default response. |
String, String |
String |
Rematch |
Refreshes matching on the webpage control and all controls under the page. If the control is currently matched, Studio detaches (unmatches) the control and its 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 webpage control. Set the detach property to True to unmatch all targets before attempting to rematch. |
Boolean detach |
Void |
ResetState |
Reserved for .NET requirements. |
None |
Void |
ResizeWindow (1 param) |
Changes the size of the window to the specified dimensions. Use the Size parameter to set the window size (in pixels). |
Size |
Void |
ResizeWindow (2 params) |
Changes the size of the window to the specified dimensions. Use the Height and Width parameters to specify the window size (in pixels). |
Int32, Int32 |
Void |
SetNextKey (1 param) |
Sets a key that will be applied to the next page that is created. If WaitForCreate times out with no page being created the next key is cleared. |
String key |
Void |
WaitForCreate |
Waits for webpage to be created (matched). Returns True if the page 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 webpage to be created (matched). Returns True if the page is created before the specified number of milliseconds has elapsed. Otherwise, it returns False. For more information, see Wait For Create. |
Milliseconds |
Boolean |
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.
.
Events |
Description |
ContextMenu |
Occurs when the user requests to display the document's context menu. |
ElementChanged |
Occurs when the webpage has detected one or more elements have been added, removed, or had their text changed. This event notifies the user that the page was changed by scripts making Dynamic HTML changes. Note: The event does not fire immediately when elements are changed. Instead, Studio pauses a short time while waiting for any more changes to occur. If multiple elements are changed within a short time, the ElementChanged event may still only fire once after all those changes are made. |
PageLostFocus |
Occurs whenever focus changes from current webpage. Once the event is triggered, a Duration event argument is calculated which tallies the amount of time (in milliseconds) that the webpage was in focus. You can use the PageLostFocus event with Studio's Events feature in Generic and Custom events projects and/or directly in project automations. You can use the PageLostFocus event with applications running in Internet Explorer, including Java, Oracle Forms, Siebel, and Microsoft HTML applications (MS HTAs). For more information, see Adapter Events. |
Privacy | Trademarks | Terms of Use | Feedback
Updated: 18 June 2020
© 2016 - 2020 Pegasystems Inc. Cambridge, MA All rights reserved.