Windows Connector methods
Summarize
Summary of Windows Connector methods
The Windows Connector methods in RPA Desktop Design Studio enable interaction with Windows applications to automate tasks at various application levels. These methods are categorized into connector level, window level, and element level, allowing comprehensive control over application processes, window management, and individual UI elements.
Show less
Connector level methods
- CloseMainWindow: Closes the application's active window.
- GetMainWindowHandle: Retrieves the active window's handle ID.
- GetMainWindowTitle: Retrieves the title of the active window.
- SetWorkingDirectory: Defines the working directory for all file operations within the application.
- Start: Initiates the application.
- Terminate: Closes the application.
Window level methods
- Focus: Brings an inactive, minimized, or background window to the foreground.
- GetFields: Extracts data from form fields on the screen; requires configuration to select form elements and set data types.
- GetScreenShot: Captures the current screen as a bitmap image.
- IsCreated: Checks if a window matches predefined rules, returning a Boolean result.
- Maximize and Minimize: Controls window state by maximizing or minimizing the window.
- SendKeys: Simulates keyboard input; configurable with parameters for keys, clearing existing values, and input delay.
- SetFields: Inputs data into form fields after configuration of elements and data types.
- WaitForCreate: Waits for a window or web page to load, with configurable timeout and matching options.
Element level methods
Available by double-clicking application elements in the Project Explorer, these methods enable interaction with specific UI components:
- Click: Performs click actions on elements.
- IsCreated: Validates element existence against matching rules.
- SendKeys: Sends keystrokes to elements, with options to clear existing text and control typing delay.
- SetPassword: Securely inputs passwords as secured strings. It requires the password parameter as a secured string and a Boolean to toggle use of the SendKeys method if direct input fails.
Practical insights for ServiceNow customers
This comprehensive set of Windows Connector methods empowers ServiceNow customers to automate interaction with Windows applications reliably. The layered approach—from connector to element level—enables detailed control from launching and terminating applications to manipulating UI elements securely, such as entering passwords. Configuration steps, especially for form fields and password input, ensure accurate data handling. If password automation encounters issues, toggling the SendKeys option provides a fallback mechanism.
The Windows methods in RPA Desktop Design Studio interact with the Windows applications to perform various tasks. The connector provides methods at different levels of the Windows applications.
Windows connector method levels
Connector level methods
CloseMainWindow
Closes the active window of the application.
GetMainWindowHandle
Retrieves the handle ID of the active window of the application.
GetMainWindowTitle
Retrieves the title of the active window of the application.
SetWorkingDirectory
Sets the working directory of the application for all file operations through the application to be performed in the specified directory.
- Input
- Path
Start
Starts the application.
Terminate
Terminates the application.
Window level methods
Focus
Sets the focus on a window that is inactive, minimized, or in the background.
GetFields
Returns the data in the form fields of the screen. You must configure the method before using.
- Click the method settings icon (
).
- Select the form elements.
- Update the form element data type.
- Click OK.
- Output
- Form element data
GetScreenShot
- Output
- Return (Bitmap)
IsCreated
- Inputs
- MatchAllChildren
- Outputs
- Return (Boolean)
Maximize
Maximizes the window.
Minimize
Minimizes the window.
SendKeys
- Inputs
- Keys
SetFields
- Click the method settings icon (
).
- Select the form elements.
- Update the form element data type.
- Click OK.
- Input
- Form data field
WaitForCreate
- Inputs
- timeoutInSeconds
- Outputs
- Return (Boolean)
Element level methods
These methods are exposed when you double-click an application element under the Global Objects in the Project Explorer.
Click
Performs a click operation.
IsCreated
- Outputs
- Return (Boolean)
SendKeys
- Inputs
- Keys (String)
SetPassword
Automate entering password securely in the password field of a Windows application.
| Parameter | Description | Data Port type | Data type | Default value | Mandatory? | Notes |
|---|---|---|---|---|---|---|
| Password | Accepts the password as a secured string. | Data In | Secured string | None | Yes | Since it accepts the password as a secured string, it only shows the length of the string when you right-click on the parameter and then click Preview Data. |
| UseSendKeys | SendKeys is a method used to send keyboard inputs such as characters, numbers, and symbols to text boxes inside an application. | Data In | Boolean | False | Yes | Tip: If the SetPassword method fails to input the password in the password field, set the value to True and execute the method again. |