Forum Discussion
So, you need to be able to tell two popup windows apart?
Unfortunately, the VM I run TestComplete on is a Win 7 one. So I don't have Edge installed on it. I think you can install Edge on Win 7, but if you're running it on Win 10, I may well not get the same results. So I can't check for myself but .....
Is there no obvious way of telling them apart?
Obviously, IE is different. I just had a quick look at that and an authentication popup does not have it's own BrowserWindow object. There is only one of those. And the Page, BrowserWindow and Popup are all child objects of the IE process. So I guess they've changed how these are presented in Edge.
In IE, the popup has a caption. Does the Edge version not contain something similar? May need to dig down into the child objects a little but I'd hope there was something in there you can use?
I take it of the three "pages" in your last set of screenshots, two of those are actually popup windows? In which case, can you not just use the "Close" method as HKosova suggested? The page objects are always going to be much simpler to tell apart than the BrowserWindow objects. And certainly, the three pages in your screenshot look easy enough to tell apart?
Is this all because of the other issue you linked to? So if you pass it the page, the page finds the button, but fails to click it as the position is reported incorrectly? Any possibility you could use a hotkey instead? (ESC will usually kill a popup window ...)
Thanks Colin, pls find my comments inline.
Colin_McCrae wrote:So, you need to be able to tell two popup windows apart?
[Varun]: yes, indeed
Unfortunately, the VM I run TestComplete on is a Win 7 one. So I don't have Edge installed on it. I think you can install Edge on Win 7, but if you're running it on Win 10, I may well not get the same results. So I can't check for myself but .....
[Varun]: Yes, I'm using Win10 indeed.
Is there no obvious way of telling them apart?
[Varun]: Could not get an easy way, but trying out workaround mentioned below.
Obviously, IE is different. I just had a quick look at that and an authentication popup does not have it's own BrowserWindow object. There is only one of those. And the Page, BrowserWindow and Popup are all child objects of the IE process. So I guess they've changed how these are presented in Edge.
[Varun]: Just checked, my application is showing separate Page, BrowserWindow for pop-up's in both IE & Edge, all being child objects of IE/Edge process. May be its application dependent then.
In IE, the popup has a caption. Does the Edge version not contain something similar?
[Varun]: In IE, the 'WndCaption' property is showing correct & separate values for all windows, but in Edge it's just showing 'Microsoft Edge' for all windows.
May need to dig down into the child objects a little but I'd hope there was something in there you can use?
[Varun]: Digging down I do see a 'UIAObject()' object with 'text' & 'value' properties having the page URL as it's value, which I'm now trying to use as the workaround check.
I take it of the three "pages" in your last set of screenshots, two of those are actually popup windows?
[Varun]: yes, indeed.
In which case, can you not just use the "Close" method as HKosova suggested?
[Varun]: No, I have to do other operations as well on those pages, like clicking buttons & keying texts
The page objects are always going to be much simpler to tell apart than the BrowserWindow objects. And certainly, the three pages in your screenshot look easy enough to tell apart?
[Varun]: Indeed, I tried page object too but BrowserWindow worked best for me. The complications started when I noticed the BrowserWindow index value was not persistent.
Is this all because of the other issue you linked to?
[Varun]: yes, indeed.
So if you pass it the page, the page finds the button, but fails to click it as the position is reported incorrectly?
[Varun]: yes, indeed.
Any possibility you could use a hotkey instead? (ESC will usually kill a popup window ...)
[Varun]: No, unfortunately, many fields on the page are not accessible by hotkey.
- Colin_McCrae8 years agoCommunity Hero
I like the style of response! Very easy to follow! Kudos for that. :)
varun_masuraha wrote:
Thanks Colin, pls find my comments inline.
May need to dig down into the child objects a little but I'd hope there was something in there you can use?
[Varun]: Digging down I do see a 'UIAObject()' object with 'text' & 'value' properties having the page URL as it's value, which I'm now trying to use as the workaround check.
Given your other answers, I think this would be where I'd investigate further. If you have a page URL to use, you should be able to relate it directly to the page you want. Which is much easier to identify. Which would give you the link you need.
Won't help much with out of position clicks on buttons, but at least it should get you in the right place to try and work with the wonky buttons!
Good luck!
Related Content
- 2 years agojaredjamieson
- 8 years agoacm
- 6 years agoLAB
Recent Discussions
- 2 days agoMW_Didata