AutomationElement.Equals(Object) Method

Definition

Determines whether the specified AutomationElement has the same value as this AutomationElement.

C#
public override bool Equals(object obj);

Parameters

obj
Object

An AutomationElement to compare.

Returns

true if the specified AutomationElement is equal to this AutomationElement;otherwise false.

Remarks

Two elements that compare as equal may contain different cached information from different points in time. The equality check only tests that the AutomationElement objects refer to the same underlying user interface element; that is, that they have the same run-time identifier.

This method is equivalent to the equality operator, which also compare run-time identifiers.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also