Creating UI connectors
Interrogated controls that appear as base controls can be good candidates for UI Connectors.
To create a UI Connector, perform the following steps:
- Start the interrogation of the application.
- On the Application Designer, right-click a matched control and click the
CreateUIConnector option.
Result: The system displays the Choose Control Target Interface window, shown in the following figure. Choose control target interface - Choose the interface that best reflects the type of control being accessed. For
instance, Grids should implement
IGridTarget
, buttons should implementIButtonTarget
, and so on.Note: This option is available for .NET, Windows Presentation Foundation (WPF), and Java applications. - Click OK to create a C# (.cs) class file and open the
script editor.The system uses this file to implement the UI Connector. The system generates the file, assigns the name of the control with Connector<#> appended, and places it in the UI Connectors folder in the project.The system generates the following files:
.cs
file – The C# class file for UI Connector implementation.json
file - Contans metadata about the UI connector.design.json
file: Contains type information used for code completion. Do not modfy this file.
- Example C# class file
Use a C# class file to implement UI connectors.
- Example JSON file
The JSON file contains the same information stored in the ExpressTranslator and NativeTypeattributes. This provides Pega Robot Studio with a way to learn about a UI Connector without having to parse the code.
Previous topic Discovering members Next topic Example C# class file