event handler javascript for an unexpected winformsobject window
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
event handler javascript for an unexpected winformsobject window
I have a modal popup that occurs quite frequently in my desktop application. it is simply a status message box that pops up and goes away on its own after a few seconds or as much as a minute, however, in the namemapping/objectbrowseer it shows up defined as a WinFormsObject rather that a Window (see attached image of the objectbrowser for this object). I am trying to add this to my GeneralEvents_OnUnexpectedWindow event handler where I have created the script that handles Window popups but the appearance of the status box in my application never seems to trigger this event handler. (see attached image of javascript code). Can a WinFormsObject be handled within this event handler or will it only handle something that is defined as a Window?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's an explanation and examples that may help you out.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Marsha,
that link did truly help me get quite a bit farther along. the only problem I have now is more of a performance issue. in the linked article it states
TestComplete only checks for unexpected windows when the test performs an action (Click
, DblClick
, Activate
, etc.).
so the popup window can sometimes sit there for a long time before the handler is getting invoked to handle it. You can see that the popup was on my screen for more than a minute and a half before the event handler (which contains the Log.Message that put “Popup detected” message in the log attached image) kicked in and handled it. I need to figure out something that will force this to happen much sooner.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's under this part in that same documentation. Try changing your timeout value.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i'm sure i can get it working by playing around with the timeout. thanks!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're welcome! Let us know what worked for you. It may help someone else down the road.
