IUIAutomation::CompareElements Method

Compares two UI Automation elements to determine whether they represent the same underlying UI element.

Syntax

HRESULT CompareElements(      
    IUIAutomationElement *el1,
    IUIAutomationElement *el2,
    BOOL *areSame
);

Parameters

  • el1
    [in] The address of the IUIAutomationElement interface of the first element to compare.
  • el2
    [in] The address of the IUIAutomationElement interface of the second element to compare.
  • areSame
    [out, retval] The address of a variable that receives TRUE if the run-time identifiers of the elements are the same, or FALSE otherwise.

Return Value

Returns S_OK if successful, or an error value otherwise.

See Also

IUIAutomation::CompareRuntimeIds