I hve a web app that can open several windows, not new browser windows, but windows overlapping the main window, like pop up windows. At one place I have to verify if I am on the main app window. My first idea was to get the number of windows in a browser and if this is 0 then I am home, but I cannot find a solution to how to count those objects.
Main page looks like this :
Browser().Page()
If I open a new window (popup) it looks like this :
Browser().Window().Page()
And if I open another from the previous one it looks like this :
Browser().Window().Window().Page()
The question is how can I get the number of Window elements?