Forum Discussion
My app has a control which user can drag and drop into any window. When dropping, then we run the Sys.Desktop.ObjectFromPoint to identify which object it is based on the coordinates where it was dropped.
So, basically, when we utilize the Sys.Desktop.ObjectFromPoint method passing the coordinates of an object within the Windows Security popup, then an exception is raised as that method is not able to identify the window we're spying (as picture in my first message).
Also, I realized that when opening TestComplete, then opening a project, then clicking the 'Display Object Spy' button at top of TestComplete, and then draging and dropping the target into any object from same Windows Security popup, then the object is recognized and works as expected. So the problem happens only when we are spying the object via a customized app, utilizing the Sys.Desktop.ObjectFromPoint method. And just to remember that the error is raised by the ObjectFromPoint method, not by my application code itself.
Verify the co-ordinates are correct. It's entirely possible that those co-ordinates, when selected, aren't finding anything at that point that can be recognized as an on screen object of some sort.
- leonardopscruz6 years agoNew Contributor
The coordinates seems to be fine, as it is poiting exactly to where I dropped (I double checked). Any other idea?
- tristaanogre6 years agoEsteemed Contributor
When you use TestComplete object spy, what do you see at the point where you dropped? It's possible that TestComplete is not finding anything there, actually, hence the message... it's simply reporting 'nothing found' at the co-ordinates.
Now, it COULD very well be that it's the Windows Security popup that you're attempting to do something with. It may be a fail safe to prevent, exactly, what you're trying to do.. obtain the data entry field for the password or some other component... to prevent hackers running scripts.
Does the same code work with other objects other than Windows Security?
- leonardopscruz6 years agoNew Contributor
"When you use TestComplete object spy, what do you see at the point where you dropped? "
When I utilize the Object Spy of my custom app (which is utilizing the method I mentioned above), then nothing happens as the exception is thrown. If I insist, then the Windows Security popup freezes.
When I utilize the Object Spy from TestComplete IDE (I mean, by clicking the button at top of TestComplete software when editing a project), and then drop the target into same Windows Security screen, then the red square blinks around the object and it is correcntly recnognized. So, it works.
"Does the same code work with other objects other than Windows Security?"
Yes. My code is working with everything else. Also, I must say that the issue is happening only with the Windows Security popup that is raised by Microsoft Outlook. So, when opening my Outlook, then the popup is opened to insert credentials and that popup is the one I cant spy. However, if I open any other software which prompts the Windows Security popup, then it works.
So, as it works with another Windows Security popups I'm not sure the reason would be security. And I know it makes the problem even harder to overcome...
Does TestComplete ObjectFromPoint method logs anywhere when it fails? I tried Windows Events Log but found nothing there.
Related Content
Recent Discussions
- 6 hours agoSubhraDas