Perform Mouse DoubleClick, Move

Best practices, code snippets for common functionality, examples, and guidelines.
oualiSAI
Posts: 12
Joined: Thu May 10, 2018 8:19 pm

Perform Mouse DoubleClick, Move

Post by oualiSAI » Fri May 25, 2018 2:39 pm

Hi,

Is there a way to perform doubleClick or mouse move like the method button.PerformClick() without seeing the mouse?


Thanks.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Perform Mouse DoubleClick, Move

Post by odklizec » Fri May 25, 2018 4:00 pm

Hi,

If you mean you do not want to see mouse movement between the actions, then the solution is to enable “Turbo” mode, who eliminates all delays, except the manually added delays.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

oualiSAI
Posts: 12
Joined: Thu May 10, 2018 8:19 pm

Re: Perform Mouse DoubleClick, Move

Post by oualiSAI » Fri May 25, 2018 4:20 pm

i mean is there a fonction like performclick() for doubleclick or mouse move, because sometimes the double click and click don't work when the delay between two actions is not enough.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Perform Mouse DoubleClick, Move

Post by odklizec » Fri May 25, 2018 4:37 pm

Hi,

No, there is no equivalent of performclick for double click. But honestly, I’m hard to see how such action would help wit your problem? In fact, there is a big chance performclick will fail, especially in web-based apps, because it does not trigger onmouse events. Hence PerformClick action should be used in caution and normal click is preferred. In my opinion, you simply need to optimize your test. Find what’s the cause of missed clicks (it may very well be caused by Remote Desktop connection) and solve it by adding waitfor actions or delays at problematic places.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

oualiSAI
Posts: 12
Joined: Thu May 10, 2018 8:19 pm

Re: Perform Mouse DoubleClick, Move

Post by oualiSAI » Sun May 27, 2018 3:14 am

Thank you for your response, effectively i think that the problem is because i'm writing the tests in Remote Desktop Connection , for the moment the method performClick work well.

I have two more question if you can help me,
1) in my application i would verify that an object apear in a geographic map when i click in a button, the probleme is that the symbol of the object can be changed by a user this is the reason why i can not use the Image based test. can you suggest me another solution? or can i do the the image based dynamically for example verify the symbol of an object and use the image based according to the symbol selected by a user?

2) for my tests i'm using Remote Desktop connection , the problem is that the RDC (remote desktop connection) lock every one hour, and i don't have control on this machine, how can i ensure that the tests will continue when the RDC will lock?


Thank you

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Perform Mouse DoubleClick, Move

Post by odklizec » Mon May 28, 2018 7:57 am

oualiSAI wrote:Thank you for your response, effectively i think that the problem is because i'm writing the tests in Remote Desktop Connection , for the moment the method performClick work well.

I have two more question if you can help me,
1) in my application i would verify that an object apear in a geographic map when i click in a button, the probleme is that the symbol of the object can be changed by a user this is the reason why i can not use the Image based test. can you suggest me another solution? or can i do the the image based dynamically for example verify the symbol of an object and use the image based according to the symbol selected by a user?

2) for my tests i'm using Remote Desktop connection , the problem is that the RDC (remote desktop connection) lock every one hour, and i don't have control on this machine, how can i ensure that the tests will continue when the RDC will lock?


Thank you
Hi,

Well, MS RD is hell for TA ;) It's better to use something else, like VNC, which stays connected (unlike RD), even if the VNC window is minimized or closed. I'm not using screenshot-based automation much, so I can't answer your first question. I believe it should be possible to load a custom image from code? Try to search this form. I think it was discussed in the past.

As for your second question, as mentioned, RD must remain open. Minimized, closed or locked desktop will result in non-functional test, because Ranorex requires realized desktop to be able to track elements. So you must either make sure thatRD is active and unlocked, or stay away form RD and use something like VNC, which stays connected, even with minimized/closed VNC window.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

oualiSAI
Posts: 12
Joined: Thu May 10, 2018 8:19 pm

Re: Perform Mouse DoubleClick, Move

Post by oualiSAI » Mon May 28, 2018 9:23 am

hello,

the problem is that i have no choise, i have to use RD, what do you think if i install a virtual machine inside the RD, to ensure that when the RD is locked the tests will continue to work?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Perform Mouse DoubleClick, Move

Post by odklizec » Mon May 28, 2018 9:34 am

I'm afraid, Ranorex cannot work with locked desktop. You must ensure that the machine, where your test runs, is unlocked during the time of test. Ranorex (any UI test automation tool) is not able to recognize UI elements on locked desktop.

Check for example this post:
https://www.ranorex.com/forum/run-tests ... tml#p44803
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration