Forum Discussion
That index is similar to the index that comes up of there is more than one process running for a desktop application. It has to do with which process is "top" of the Z-order (again... could be wrong here).
I'm assuming that you need to be able to find this pop-up browser window in order to interact with it. So long as the are generally the same window, you could do some sort of check based upon ChildCount, even use NameMapping to map them that way. One BrowserWindow has a childcount of 5, one of 16... that's a more consistent identifying factor than the process index.
Hi Robert,
Thanks for the reply.
I too thought of using childcount check to find the required window, but in one of the situations, there is 2nd pop-window (freezing the main window 'and' 1st pop-up) who has same childcount, hence complicating the situation.
Attaching screenshots for this situation.
Note that we are not using NameMapping.
regards,
Varun
- Colin_McCrae8 years agoCommunity Hero
You could capture ALL browser windows. Then cycle through the resulting array of objects and only keep the one with the correct child count?
I'm not sure from all this which window you're actually trying to work with though? If you need to clear the popups in sequence, I suspect you're going to need another way of telling them apart (caption?) in order to isolate them in the correct order.
- varun_masuraha8 years agoContributor
Hi Colin,
Thx for the reply.
We are trying to maintain generic functions to handle any window, either main or pop-up, by just passing its page object as parameter.
Yes, I have to find an indirect way of getting browser window from browser page. We do get correct page object, but there is no direct way to get its corresponding window as many windows have same childcount.
regards,
Varun
- HKosova8 years agoSmartBear Alumni (Retired)
Why do you need the BrowserWindow object in the first place? If you need to close the window, you can use Page.Close().
Related Content
- 2 years agojaredjamieson
- 8 years agoacm
- 6 years agoLAB
Recent Discussions
- 2 days agoMW_Didata