Implementing UI connectors
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:
The generated UI Connector class inherits from ExpressTargetBase connector:
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>'
Previous topic Re-creating a control as the correct type Next topic Simple and complex types