Problem with TestComplete locating a pop up
Hi Everyone,
I have been trying to find a solution or even a workaround for an issue with my TestComplete Keyword mode script, which seems unable to find a pop up window. I actually see the application is launching a pop up with the name "Scheduler" but I believe since I did not create the popup I cannot reference it by that name.
In any event I tried looking at this link but there is still a missing piece for me.
I am able to select the window with the object spy. However, here is what I am doing incorrectly - I try to use setFocus() as a code snippet to change the focus to the popup window... In Object Spy the Window is named "BrowserWindow(1)" but "BrowserWindow(1).setFocus() does not work (not surprisingly).
In Selenium there is a way to "getWindowHandles()" to get all open windows and then you switchTo() and reference the window you want.
Here I am at a loss as to how to resolve this... I was trying to even look up how to workaround this by just using JavaScript but again I am trying to locate a window that is open that was launched as a result of a click action in the application I am testing. (in JS it is fairly straightforward if you want to reference a popup you yourself created, but that is not the case here)
My object map has the element but basically I want to switch the focus to the popup - enter some data in input fields on the popup, and then close the popup via click of another button (if I can switch the focus the rest should be easy).
Thanks in advance for any suggestions you may have... I attached some screenshots.
(~ (TestComplete Version: 12.42.3048.7 x64 | Firefox 52.4.1 (64-bit) ~)
Try to call snippet: Alias.browser.BrowserWindow(1).SetFocus();
Does it help?