Android - double tap

Mobile Testing, Android App Testing.
Uzivatel
Posts: 13
Joined: Wed Oct 31, 2018 11:10 am

Android - double tap

Post by Uzivatel » Tue Nov 06, 2018 5:10 pm

Hello community,

I am testing the trial version of Ranorex to see what everything Ranorex is able to automate in mobile area. I am using Ranorex ver. 8.3.0

Currently I face the issue with double tap action.
I use simple Android native app. The behaviour is that if the user double taps on the screen, the toast with text "Double-tap with 1 finger(s)." is displayed.

Please see the test steps:
Test_DoubleTap.png
Test_DoubleTap.png (21.88 KiB) Viewed 83 times
Issue is that when I execute the test, on mobile I do not see the toast. According the test results, the step double tap action passed but the test fails on validation step as there is no toast displayed.
Note: In the test I linked the 'double tap' action to TextView element. However I tried it also with tapping on whole activity/container with same result, the toast did not appear.
Question: How I should execute the double tap action that the app will react in the same way as it is in manual case => toast is displayed.

Please, see the screen with highlighted element I am trying to double tap.
Screenshot_2018-11-06-16-58-15.png
Screenshot_2018-11-06-16-58-15.png (73.24 KiB) Viewed 83 times
Last edited by Uzivatel on Fri Nov 09, 2018 12:48 pm, edited 1 time in total.

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

Re: Android - double tap

Post by odklizec » Wed Nov 07, 2018 10:21 am

Hi,

Could you please upload a Ranorex snapshot of the app and xpaths behind TextViewAdditionResult element? And if possible, upload also the test application and test suite, so anyone here can eventually try it? Thanks ;)
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

Uzivatel
Posts: 13
Joined: Wed Oct 31, 2018 11:10 am

Re: Android - double tap

Post by Uzivatel » Thu Nov 08, 2018 11:39 am

Hello,

Please, see attached:
- the Ranorex snapshot:
RxTestAppTextViewAdditionResultElement.rxsnp
(37.19 KiB) Downloaded 3 times
- the test application:
app-debug3.7z
(1.67 MiB) Downloaded 2 times
- the test suite:
DoubleTap.7z
(900 Bytes) Downloaded 3 times
Please note, the double tap works on 1st app screen. If you (anybody) find it out how to invoke the toast by double tap and automate it in Ranorex, I will appreciate it. Thanks.

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

Re: Android - double tap

Post by odklizec » Thu Nov 08, 2018 12:51 pm

Hi Monika,

Unfortunately, the DoubleTap.7z archive contains just rxtst file. Please pack the whole solution using menu Tools >> Compress solution and open folder. Thanks.
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

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

Re: Android - double tap

Post by odklizec » Thu Nov 08, 2018 3:28 pm

Hahaha...well, it seems you found a bug Monika? :D No need to send the solution anymore.

From some unknown reasons, this particular element seems ignore the double tap action. However, there is a solution! Here are the steps:
- convert the DoubleTap action to usercode - right click on DoubleTap action and from the appeared menu select "Convert to user code".
- now go to the converted user code and simply replace DoubleTap() method with DoubleClick(), like this:
DoubleClick.png
DoubleClick.png (7.29 KiB) Viewed 57 times
And that's it :D

My obvious reaction, was to change the adaptertype Text to AndroidElement and MobileUIElement, but neither helped. Luckily, the double click action still works with this kind of mobile element. But because the DoubleClick action is not accessible via recording actions (for mobile elements), it needs to be done in code.

Failed DoubleTap on Text element, is definitely something, that should be checked by Ranorex folks. The attached app should help.
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

Uzivatel
Posts: 13
Joined: Wed Oct 31, 2018 11:10 am

Re: Android - double tap

Post by Uzivatel » Thu Nov 08, 2018 5:07 pm

Hello Pavel,

Thanks so much for the help. With your workaround it works for me nicely :)

I was thinking that the issue will be related to used repository element but the text element I used seemed for me OK. So, as you wrote, the issue is probably on Ranorex side, at least there is the limitation.

I have already raised the issue on Support team, so I will highlight to them your findings. I will keep you updated here with the response from them.

Uzivatel
Posts: 13
Joined: Wed Oct 31, 2018 11:10 am

Re: Android - double tap

Post by Uzivatel » Wed Nov 14, 2018 3:31 pm

Hello,

FYI: posting the answer from support team. The issue will be reported to dev team.
Moreover there is a workaround using Settings in Test:
The workaround with the Double Click doesn’t have to involve code, by the way.
By default, Ranorex will generate Mobile Recordings for you when you have a mobile application that you want to test, and therefore will not show you the click actions, for example. However, there is a simple way to change a Recording itself. In the settings of a recording, under “Current Recording” you can change the Recorder UI Mode to “Global”. Then you can also use Click actions (like a Double Click) also in the UI without the need to use code.


To add: the additional actions will be then visible when you choose "+ Add new action" option. The list should now include the options like Mouse, Mouse Wheel....

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

Re: Android - double tap

Post by odklizec » Wed Nov 14, 2018 3:41 pm

Hi Monika,

Thanks for the additional details from support. An interesting approach! Normally, I would not expect that desktop actions would work with mobile devices? :D So it's nice to hear they can be used this way and we can use them from recordings too.
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