Q:

How AutomationElement work for UI Automation

I used to be working on web bowers UI Automation. The elements are located with JavaScript or Selenium Driver via browser native API.(Either way the app itself(which is the browser) provide the automation ability).
Now my current job is doing with window UI automation. So there is some concept I am still learning.
The API used to local UI element here is AutomationElement in .NET framework, thought I don't know what others can be used.
One thing I am very curious is that how does this work. Does this API only work for .NET application that is running on CLR?
If yes, then it make more sense for me.
Otherwise, I am not able to understand how this API being able to locate UI element from other apps.

A:

the API you see in your clr .net application is a wrapper for native windows ui automation, it will work and can be used by you with any application that supports ui automation, and that is practically all applications since ui automations works for microsoft winforms, java spring, wpf, etcetera etcetera
a program, for example windows calculator, will tell ui automation of current ui elements and the capabilies they have for automation and you will use that info to automate it, here is an example of automating windows calculator: http://www.codeproject.com/Articles/141842/Automate-your-UI-using-Microsoft-Automation-Framew

