Up to a point, you can use Spy++ as Niklas suggested.
However, within the main browser window (where the html is displayed)
the elements you see are not windows (HWNDs); they are elements that the browser creates for the purpose of display, and are commonly referred to as the DOM structure (google for it).
If this is what you want look at, your best bet is to use MSAA. See here for details:
XMSAALib - a non-MFC class to retrieve accessibility (MSAA) info[
^]