title: Identifier for a Windows GUI element (AutomationElement HashCode and RuntimeID)
body: <p>I am looking for a way to identify instances of a certain GUI element (for example the "copy" entry in the context menu of the Windows Explorer). </p>
  
  <p>I tried both the .GetHashCode and the .GetRuntimeId method on the <a href="http://msdn.microsoft.com/en-us/library/system.windows.automation.automationelement.aspx" rel="nofollow">AutomationElement</a>, but they both change each time I open the context menu.</p>
  
  <p>What is the difference/purpose between RuntimeId and HashCode anyway?</p>
  
  <p>Any ideas how I could identfy the GUI element without comparing the label/name string?</p>