Biswaj
We've given you two possible answers and a method to find out definitively for yourself - i.e. look in the code for yourself - but neither of those three options seem seem to satisfy you.
Another distinct possibility that springs to mind following another recent discussion on this forum is that the IDE uses a javascript "getElementUnder" cursor function to identify the element on which an action is being performed.
That's the problem with people being "just curious" ... sometimes they just don't have a clear enough idea of what they are trying to ask for any answer to satisfy them. No wonder you haven't found any answer.
And on that point ... if you haven't looked in the code then you certainly haven't looked everywhere!
And if you still can't be bothered to look in the code fro a definitive answer, you might want to ask on the "Selenium Developers" group for a more definitive answer. People on the "Selenium Users" group are generally more interested in using Selenium than understanding the internal architecture and programming specifics.
> ... every testing tool might be using the same technique.
Do you know what technique all the other testing tools use? I suspect not. So even knowing the right answer for Selenium IDE won't really satisfy you.
Anyway ... I think i can answer that one definitively: all testing tools do NOT use the same technique to identify elements.
For a start, not all offer a "record and playback" feature, which would be possible by all tools if they all used the same approach.
And there are certainly a number of distinct approaches possible and used in practice that I know of.
QTP looks at COM level objects of windows applications, I understand, while AutoIT (which could be used for testing if desired) works at a (slightly lower?) windows API of level. The Java Robot api presumably also works on api level calls, but must have different API wrappers for each operating system.
Sikuli works on the graphical images displayed on the screen, whereas WebDriver interacts directly with individual browsers (and can even use a "headless" browser which doesn't have any graphical representation so couldn't be used by any of the above mentioned tools, again proving that it must work differently to those other tools).
Selenium IDE works by injecting javascript into a browser, and the record function only works in Firefox, though, uniquely, scripts can be playback in pretty well any browser, or at least more than any other testing tool, I believe .. which again indicates that it must use a different technique to any other "testing" tool.
Peter