QTP: WinButton Click Event not true simulation of mouse click

I am attempting to fire a click event on a WinButton in the IE “File Download - Security Warning” dialog with QTP. However, there is slight problem: IE seems to know that I am not physically clicking the mouse, but instead I am interacting with the XMLDOM to get at it.

IE has a security setting that allows one to let IE automatically prompt for a file download. This usually occurs when the page you open attempts to open a file and without the interaction of the user (via mouse or whatever). If I set my IE to allow this, then it works fine. Trouble is that I don't want to change the settings on every machine I use to test. Some people wouldn't like their settings altered either.

QTP does allow “low-level” recording, and this works. It simulates the actual mouse movements and clicks (via interrupt rather than XMLDOM) to get some more approximating reality. However it is heavily coordinate based, and I don't want to rely on it. I expect it break every time I try to use it, that sort of thing.

I am trying to find a better solution and will post it when I do....

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
Print | posted on Monday, July 17, 2006 12:45 PM

Feedback

# re: QTP: WinButton Click Event not true simulation of mouse click

left by Dayaz at 6/7/2007 4:12 PM Gravatar
Thanks Man !!! I ran into this today and spent six hours wondering why click wasn't working. Thanks to your blog , I know now and I know the workaround :)

# re: QTP: WinButton Click Event not true simulation of mouse click

left by keson at 4/9/2008 4:56 AM Gravatar
why do i can't see the answer? :-(
Comments have been closed on this topic.