Swipe Gestures on iOS not working as expected

Mobile Testing, Android App Testing.
Patrick Hollerbach
Posts: 21
Joined: Thu Jan 02, 2014 4:00 pm

Swipe Gestures on iOS not working as expected

Post by Patrick Hollerbach » Mon Sep 29, 2014 7:18 am

Hello,

we're using Ranorex 5.1.2 to test an iOS Application on iOs7.x. In this Application we have a table with some cells representing data records. When the user wants to delete one of the records, he has to slide the cell of the record to the left, after this action a delete button appears in that cell.
I added a swipe action to the recording module and made the following configuration:

Swipe Direction: left
Distance: 500
Swipe Duration: 500ms
Repository Item: <the table cell>

But this action does not do the expected swipe-action. It looks like a up or down swipe was made to the table.
How do I have to configure the swipe action to get it work?

Regards,
Patrick

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

Re: Swipe Gestures on iOS not working as expected

Post by Support Team » Tue Sep 30, 2014 12:43 pm

Hello Patrick,

It seems like the swipe action is applied to the wrong item/container.
May I ask you to create a Ranorex snapshot of your application under test? Please upload the file to the forum or send it to [email protected]

Please point out which element is used for the swipe action.

Thanks,
Robert
.
Image

JToelstede
Posts: 55
Joined: Fri May 24, 2013 12:57 pm

Re: Swipe Gestures on iOS not working as expected

Post by JToelstede » Wed Oct 15, 2014 6:49 am

Hi Robert,

sorry, but Patrick and I are not allowed to send you a snapshot of the AUT.
Support Team wrote:It seems like the swipe action is applied to the wrong item/container.
Can you please tell us which items/container could be used for a swipe gesture.

It would be fine when you could post an excample how to work with the swipe function in iOS.
Do you have some more documentation for this function especially for the parameters.

Best regards,
Joe

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

Re: Swipe Gestures on iOS not working as expected

Post by Support Team » Mon Oct 20, 2014 9:36 am

Hello Joe,

It’s difficult to suggest the use of an element/container without knowing how the structure of your application looks like.

Please let me illustrate the mentioned behavior based on the KeePass sample app.

Structure of the table:
iOS_KeePass_TableStructure.png
iOS_KeePass_TableStructure.png (3.76 KiB) Viewed 2308 times
As you can see there is just a single “Database”(Cell) available.
iOS_KeePass_Cell.png
iOS_KeePass_Cell.png (3.46 KiB) Viewed 2308 times
If you now add a Swipe Gesture (left) to the Container 'UITableViewWrapperView' ...
iOS_KeePass_Container.png
iOS_KeePass_Container.png (5.08 KiB) Viewed 2308 times
... the Swipe action will not swipe the cell *.kdb to the left, but the swipe will be seen as a Swipe Up/Down as you mentioned in your post.

The Swipe action will be correctly executed when applying it to the Container 'UITableViewCellScrollView' or cell itself.

Please note that we highly recommend updating to our latest version (Ranorex 5.2).

Regards,
Robert
.
Image

JToelstede
Posts: 55
Joined: Fri May 24, 2013 12:57 pm

Re: Swipe Gestures on iOS not working as expected

Post by JToelstede » Fri Oct 24, 2014 12:50 pm

Hi Robert,

many thanks for your post.

Because of your recommendation I first updated to Ranorex 5.2.

After that I ran the test again but it does not work either.
The swipe Gesture to the right is executed but in the direction down.

So I changed the repository element direct on to the UITableViewCell-object and started the test run again.
SwipeGesture_Rigth.jpg
SwipeGesture_Rigth.jpg (3.75 KiB) Viewed 2291 times
SwipeGesture_TableCell.jpg
SwipeGesture_TableCell.jpg (2.28 KiB) Viewed 2291 times
It produces the same result as above.

After that I changed the direction of the swipe from Right to Up(from 0° to 270°).
SwipeGesture_Up.jpg
SwipeGesture_Up.jpg (2.75 KiB) Viewed 2291 times
I started the automation again and everything worked fine.
I have to mention that all my tests are executed in landscape-mode.

I rotate the iPad to portrait-mode and run the test again with the swipe direction Up.
The automation execute a swipe gesture in the direction Up.

Could it be that ranorex doesn't handle the device-orientation (portrait/landscape) for the swipe-gesture?

Best regards
Joe

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

Re: Swipe Gestures on iOS not working as expected

Post by Support Team » Mon Oct 27, 2014 11:37 am

Hello Joe,

Ranorex handles the device-orientation for the swipe-gesture, so this should not cause the issue. Again, we are not able to reproduce the issue on our side :(

Regards,
Robert
.
Image

JToelstede
Posts: 55
Joined: Fri May 24, 2013 12:57 pm

Re: Swipe Gestures on iOS not working as expected

Post by JToelstede » Mon Nov 03, 2014 10:53 am

Dear Robert,

I tried to reproduce my problems in the KeePass Sample-App.
For that I created a new testcase "Recording2.rxrec" with the following test-steps:
1. add a new KeePass-file
2. make a swipe to the left for deleting the created entry
3. tap on the now displayed delete-button.

I run the test for all orientations:
tn2244_Xcode_SupportedInterfaceorientations.jpg
tn2244_Xcode_SupportedInterfaceorientations.jpg (41.15 KiB) Viewed 2256 times
The test for the orientations "Portrait" and "Landscape-Right" were successfull but the tests for the orientations "Upside Down" and Landscape-Left" failed.

I added the RxProject for the KeePass-Sample and a zip-file with the reports in pdf-format.

I hope that this will help you.

Best regards.
Joe
Attachments
Test-Swipe_Reports.zip
(335.33 KiB) Downloaded 86 times
TestKeePass.zip
(1.99 MiB) Downloaded 100 times

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

Re: Swipe Gestures on iOS not working as expected

Post by Support Team » Thu Nov 06, 2014 12:56 pm

Hello all,

The issue was reproducible on our side. We will try to resolve the issue as soon as possible.
Thank you for your patience.

Regards,
Robert
.
Image