Hello all,
in our AUT we have an UICollectionView, which contains some sections with items, the user can scroll the UICollectionView. How can I scroll the UICollectionView with ranorex to reach the items which are on the bottom of the UICollectionView? An iOSTable provides a ScrollTable() method, but I can't find anything like this for the UICollectionView.
We're still using Ranorex 4.1.6 because of a bug in Ranorex 5 which causes our AUT to crash (which will be hopefully fixed in 5.1.1). Is there any way to scroll the UICollectionView with Ranorex 4.1.6 or will it be possible with 5.x?
Thanks,
Patrick
iOS-Testing: How to scroll an UICollectionView?
- Patrick Hollerbach
- Posts: 34
- Joined: Thu Jan 02, 2014 4:00 pm
- Location: Frankurt, Germany
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: iOS-Testing: How to scroll an UICollectionView?
Hi Patrick,
The UICollectionView control is supported since Ranorex 5.0 and is identified as a Ranorex Table.
In order to scroll a UICollectionView you can use the Set Value action and the ContentOffsetY attribute as shown below: Regards,
Markus
The UICollectionView control is supported since Ranorex 5.0 and is identified as a Ranorex Table.
In order to scroll a UICollectionView you can use the Set Value action and the ContentOffsetY attribute as shown below: Regards,
Markus
You do not have the required permissions to view the files attached to this post.
- Patrick Hollerbach
- Posts: 34
- Joined: Thu Jan 02, 2014 4:00 pm
- Location: Frankurt, Germany
Re: iOS-Testing: How to scroll an UICollectionView?
Hi Markus,
works for me with ContentOffsetX. I use the height of the UICollectionView to scroll exactly "1 Page". Thank you very much!
Regards,
Patrick
works for me with ContentOffsetX. I use the height of the UICollectionView to scroll exactly "1 Page". Thank you very much!
Regards,
Patrick
- Patrick Hollerbach
- Posts: 34
- Joined: Thu Jan 02, 2014 4:00 pm
- Location: Frankurt, Germany
Re: iOS-Testing: How to scroll an UICollectionView?
Hi there,
we migrated to Ranorex 5 which identifies a UICollectionView as a Ranorex Table.
But there is no method in a Ranorex Table to scroll the table.
Ranorex iOSTable has a method "ScrollTable" but it is not possible to cast a Ranorex Table which is a UICollectionView to an iOSTable.
Can you tell me how I can scroll the UICollectionView?
Regards,
Patrick
we migrated to Ranorex 5 which identifies a UICollectionView as a Ranorex Table.
But there is no method in a Ranorex Table to scroll the table.
Ranorex iOSTable has a method "ScrollTable" but it is not possible to cast a Ranorex Table which is a UICollectionView to an iOSTable.
Can you tell me how I can scroll the UICollectionView?
Regards,
Patrick
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: iOS-Testing: How to scroll an UICollectionView?
Hi Patrick,
You can either use a Swipe gesture or an invoke action ‘EnsureVisible()’ on the specific element in order to scroll within your UICollectionView.
Regards,
Markus (S)
You can either use a Swipe gesture or an invoke action ‘EnsureVisible()’ on the specific element in order to scroll within your UICollectionView.
Regards,
Markus (S)