Button LongClicks on Winforms application?

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
nmellor
Posts: 2
Joined: Fri Jun 09, 2017 2:18 am

Button LongClicks on Winforms application?

Post by nmellor » Fri Jun 09, 2017 2:43 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Button LongClicks on Winforms application?

Post by Support Team » Mon Jun 12, 2017 2:11 pm

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
MouseDownUp.png (12.08 KiB) Viewed 627 times
Please let me know if that helps.

Sincerely,
Robert
.
Image

nmellor
Posts: 2
Joined: Fri Jun 09, 2017 2:18 am

Re: Button LongClicks on Winforms application?

Post by nmellor » Tue Jun 13, 2017 2:54 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Button LongClicks on Winforms application?

Post by Support Team » Tue Jun 13, 2017 9:45 am

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
.
Image