IUITestEventNotify::Notify Method (IUITechnologyElement^, IUITechnologyElement^, UITestEventType, Object^)
The callback method for the event added via IUITechnologyManager.AddEventHandler.
The callback should occur on a different thread than the one used to add the event handler to make sure that the callback is not blocking adding and removing of the event handlers.
Assembly: Microsoft.VisualStudio.TestTools.UITest.Extension (in Microsoft.VisualStudio.TestTools.UITest.Extension.dll)
void Notify(
IUITechnologyElement^ source,
IUITechnologyElement^ target,
UITestEventType eventType,
Object^ eventArgs
)
Parameters
- source
-
Type:
Microsoft.VisualStudio.TestTools.UITest.Extension::IUITechnologyElement^
An IUITechnologyElement that represents the source element.
- target
-
Type:
Microsoft.VisualStudio.TestTools.UITest.Extension::IUITechnologyElement^
An IUITechnologyElement that represents the target element.
- eventType
-
Type:
Microsoft.VisualStudio.TestTools.UITest.Extension::UITestEventType
A member of the UITestEventType enumeration that specifies the type of event.
- eventArgs
-
Type:
System::Object^
The EventArgs object that is provided for the event.
In most cases, the source and target element will be the same.
However, this might not be always the case. For example, clicking a label for a check box changes the state of the check box. Here, the source is the label and the target is the check box. Similarly, when target is ComboBox, the source could be the Edit or List within it.
The source can be null, which means source and target are the same.