Results 1 to 6 of 6
  1. #1

    truly simulate a user mouse click


    we want to properly simulate a user clicking on our browser app.

    Testcomplete allows us to specify an onscreen object. However we want to simulate a click at a specific point within the space ocupied by the browser window, without actually knowing what the object is. IE click on the top (z-order) object at that location.

    We have tried specifying a frame & clicking within the frame. TestComplete logs the following error: "There was an attempt to perform an action at point (369, 260), which is overlapped by another window.".

    We want the click event to actually be passed to the overlapping window. IE just as if a real user clicked at that point within the frame.

  2. #2

    Re: truly simulate a user mouse click

    You could try the following:

    1. OnscreenObject.HoverMouse to move the mouse to the position where you want to click.
    2. Get the coordinates of the mouse relative to the desktop using: Sys.Desktop.MouseX and MouseY
    3. Simulate a click relative to the desktop by using: Sys.Desktop.MouseDown then MouseUp (coords from step 2 are used here)
    Matt Gray

  3. #3

    Re: truly simulate a user mouse click

    Hi kon_t,

    You can also try calling the Click method for the IE window which is the parent window for your web page.
    Allen - SmartBear Support

  4. #4

    Re: truly simulate a user mouse click

    Thanks Matt,

    We still had to experiment a bit, but I believe that your algorithm will be workable.

  5. #5

    Re: truly simulate a user mouse click

    Hi Allen,

    using the owning frame or window still generates the ".. overlapped by another window" error.

  6. #6

    Re: truly simulate a user mouse click

    Hi kon_t,

    That's really strange. In this case, I recommend that you use the approach suggested by Matt. If you decide to investigate the behavior you observe when the IE window is clicked, let us know the full name (not the mapped name) of the window for which the Click method is called and that of the overlapping window.
    Allen - SmartBear Support



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 04:01 PM.

Copyright BetaSoft Inc.