Forum Discussion

svaze74's avatar
svaze74
Contributor
11 years ago
Solved

Can we customize the speed of mouse click in testcomplete

Hi,
Sometimes the mouse click operation appears to happen successfully but the expected result does not occur during automated test run.

When clicking on button manually, the expected result is correct.

So my doubt is, while it appears on screen during automated run that the button is clicked but its not clicking it properly or at all.

To achieve this, may be speed of mouse click needs to be adjusted. Can this be achieved in testcomplete?

Thanks,
Shrirang
  • Hi Shrirang,



    No, according to my knowledge, the speed of the mouse click is not parametarizable.

    But you can use the LLPlayer object and create your custom function that will press left mouse button at some screen point (you will need to convert coordinates from object-based to screen-based), wait for some time (this will be your parameter) and release the pressed button.

    Does this help?

5 Replies

  • jose_pita's avatar
    jose_pita
    Super Contributor
    Hi Shrirang,



    Sometimes this happens to me but because the object is not available yet.

    I mean, it is visible and visibleOnScreen but is not "ready" yet. I advise you to put some delay before the click action and see what happens.



    If this is not your problem, please ignore.



    Hope it helps
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Shrirang,



    No, according to my knowledge, the speed of the mouse click is not parametarizable.

    But you can use the LLPlayer object and create your custom function that will press left mouse button at some screen point (you will need to convert coordinates from object-based to screen-based), wait for some time (this will be your parameter) and release the pressed button.

    Does this help?
  • Thanks for the replies.

    Yes using a low level procedure was the last option since its not always reliable but that seems to be the only way out for now.

    @Jose, wait period didn't help since the button works well manually almost immediately.

    Thanks anyway, Shrirang

  • Check out Tools\Current project Properties\Playback

    see if the keypress delay or delay between events are the oprions you are looking for.