Hi all,
We're using Ranorex with a legacy application. We don't have access to the source code of the application, so this is a black box situation.
The problem we're having is:
(1) .Click() does click a button
(2) when a human clicks the button, a pop-up window appears offering further choices BUT
(3) when Ranorex clicks the button, the same pop-up DOES NOT appear.
I'm currently working on the assumption that the mouse click as performed by a human is longer than Ranorex's .Click(), and that something in the application separately detects that the mouse button is still held down.
(any other hypotheses welcome!)
btn.Click() doesn't offer the opportunity to control how long the button is held down, so I'm finding my hypothesis hard to test.
Two questions:
(1) how long does .Click() hold down the mouse button?
(2) is there any way to customize .Click() so that I have control over the MouseDown period?
This looks likely to happen in different parts of the app, so I'm willing to change a global config if this will help.
I have tried many different ways of activating the button press, including moving focus and pressing Space, waiting after receiving focus, pressing Enter with focus.
The problem may also be to do with containers and tab order (or lack of it.)
Thanks,
Nick
Versions:
Ranorex 7.0.0
C# 6 (Visual Studio 2015)
Legacy application written in: Java Swing
Button LongClicks on Winforms application?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Button LongClicks on Winforms application?
Hello nmellor,
Welcome to our forum!
Please try to split the Click() action into a Mouse.Down() and Mouse.Up() action in order to check whether it's just a timing issue. Please let me know if that helps.
Sincerely,
Robert
Welcome to our forum!
Please try to split the Click() action into a Mouse.Down() and Mouse.Up() action in order to check whether it's just a timing issue. Please let me know if that helps.
Sincerely,
Robert
You do not have the required permissions to view the files attached to this post.
Re: Button LongClicks on Winforms application?
Thanks for the reply Robert, I'll do as you suggest.
Do you have anything to tell me about my first question? It would be helpful to know how Ranorex
models .Click(), how it breaks the click into MouseDown, delay and MouseUp internally and whether the delay is configurable.
We have a (very) legacy application to test and we are new to Ranorex.
If we know Ranorex's behavior in detail we won't need to spend so much time experimenting with the interactions between two black boxes
Thanks again,
Nick
Do you have anything to tell me about my first question? It would be helpful to know how Ranorex
models .Click(), how it breaks the click into MouseDown, delay and MouseUp internally and whether the delay is configurable.
We have a (very) legacy application to test and we are new to Ranorex.
If we know Ranorex's behavior in detail we won't need to spend so much time experimenting with the interactions between two black boxes

Thanks again,
Nick
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Button LongClicks on Winforms application?
Hey Nick,
The actual click duration is based on the Winforms DoubleClickTime, so it depends on your OS settings and can't be directly set within Ranorex settings.
Hope this helps.
Sincerely,
Robert
The actual click duration is based on the Winforms DoubleClickTime, so it depends on your OS settings and can't be directly set within Ranorex settings.
Hope this helps.
Sincerely,
Robert