Windows Connector methods
Summarize
Summary of Windows Connector methods
The Windows Connector methods in RPA Desktop Design Studio enable interaction with Windows applications at multiple levels: connector, window, and element. These methods facilitate automation tasks such as starting or terminating applications, manipulating windows, handling form data, capturing screenshots, and sending keystrokes. This functionality helps ServiceNow customers automate repetitive Windows application workflows effectively.
Show less
Connector level methods
These methods control the overall Windows application session and include:
- CloseMainWindow: Closes the active application window.
- GetMainWindowHandle: Retrieves the handle ID of the active window.
- GetMainWindowTitle: Retrieves the title of the active window.
- SetWorkingDirectory: Defines the working directory for file operations via the application.
- Start: Launches the application.
- Terminate: Ends the application process.
Window level methods
These methods operate on specific windows within the application and enable:
- Focus: Bring an inactive or background window to the foreground.
- GetFields: Extract data from form fields; requires prior configuration to select form elements and update data types.
- GetScreenShot: Capture a bitmap image of the current window screen.
- IsCreated: Boolean check whether a window matches predefined rules.
- Maximize/Minimize: Adjust window size.
- SendKeys: Simulate keystrokes; accepts keys input, with options to clear existing values and set typing delay.
- SetFields: Populate form fields after configuration to specify elements and data types.
- WaitForCreate: Wait for a window or webpage to load within a specified timeout.
Element level methods
Available when interacting with individual application elements under Global Objects, these include:
- Click: Perform click operations on UI elements.
- IsCreated: Verify if an element matches configured criteria.
- SendKeys: Send keyboard inputs to specific elements with options for clearing existing values and typing delay.
- SetPassword: Securely automate password entry. Accepts a secured string for the password and a Boolean to toggle SendKeys usage if the default method fails.
Practical application for ServiceNow customers
By leveraging these methods, customers can design robust RPA workflows to automate Windows application processes, including launching and closing apps, managing window states, extracting and inputting form data, handling secure credentials, and simulating user interactions. Proper configuration of form elements and understanding method inputs and outputs ensure reliable automation outcomes.
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. |