Thanks for replying.
I have already tried that and my problem is slightly different
In my mobile application, I have a scollable list. For example - If my screen can show only 10 items, I have 20 items in my list. So, I need to scroll the list to see and count all the items.
So, when I first get the scrollable list on my screen I count the items which are being displayed and then scroll
Process that I follow -
- Launch the app and get the list
- count the no of elemnts which are being displayed in the list
- Scroll the list element by element (i.e. Scroll the list for one element only)
- Increase the count and scroll again
- Repeat steps 3 and 4 till I get end of list
I am facing an issue in step 3 and 4
Issue is :
I know the exact length of my element, which means I know how much to scroll to bring the element in my visible list.
Length : 110
I have used swipe function to perform the scroll which looks like this : driver.swipe(200,1194,200,1084,1000);
But, the issue is that it does not scroll the exact amount every time. Sometimes, it scrolls and pulls only half element, sometimes 80% of the element. As a result of this the count I get is incorrect.
So my doubts here are -
I. Is there any method which can scroll properly ?
II. Is there any method which can scroll the list by itself and count the list of all the elements present in a scrollable list ?
Thanks in Advance,