Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Implementing UI connectors

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>'

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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