Page 1 of 1

Button LongClicks on Winforms application?

Posted: Fri Jun 09, 2017 2:43 am
by nmellor
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

Re: Button LongClicks on Winforms application?

Posted: Mon Jun 12, 2017 2:11 pm
by Support Team
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.
MouseDownUp.png
Please let me know if that helps.

Sincerely,
Robert

Re: Button LongClicks on Winforms application?

Posted: Tue Jun 13, 2017 2:54 am
by nmellor
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

Re: Button LongClicks on Winforms application?

Posted: Tue Jun 13, 2017 9:45 am
by Support Team
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