Skip to main content

Implementing UI connectors

Suggest edit Updated on November 10, 2021

Implement and test the generated UI Connector code to ensure it works in your automation.

The UI Connector code includes a region in which the target implementation is stubbed out, as in the following example:

ComboBoxTarget example
Code showing a ComboBoxTarget example.

The generated UI Connector class inherits from ExpressTargetBase connector:

Inherited connector
Code snippet showing inheritance for UI connector class.

The ExpressTargetBase connector provides the NativeControl property which provides access to the native control functionality. Using the NativeControl property in code provides code completion for the properties, methods, and events that exist on the native control.

NativeControl is a C# dynamic object. This means that there is no compile-time type checking on NativeControl, so any well-formed property access or method invocation compiles without error even if the property or method does not exist on the native control.

If the property or method does not exist, when the line of code executes the system generates the following runtime error:

'Unable to find Property/Method named '<name" on class: '<Type Name>'
Did you find this content helpful? YesNo

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us