Android Testing Movement Problems on diverent devices

Mobile Testing, Android App Testing.
ArminSeidling
Posts: 4
Joined: Thu Sep 05, 2013 1:41 pm

Android Testing Movement Problems on diverent devices

Post by ArminSeidling » Tue Sep 10, 2013 2:04 pm

Hello Guys,

i followed the api and searched for some functions for the ScrollView Movement.
At first i wrote some code to check if this 3 functions work...

Code: Select all

articleViewPager.TouchStart(Location.LowerCenter);
articleViewPager.TouchMove(Location.UpperCenter); 
articleViewPager.TouchEnd(Location.LowerCenter);
This Code worked for the "Samsung Galaxy s4" sufficiently. It may scroll but the main problem is... it won't stop at the TouchEnd function and continue scrolling so i filled the Code up with a Delay...

Code: Select all

articleViewPager.TouchStart(Location.LowerCenter);
articleViewPager.TouchMove(Location.UpperCenter); 
Delay.Milliseconds(200);
articleViewPager.TouchEnd(Location.LowerCenter);
That code was perfect for the "s4", so i tried the same Code on the "Nexus 7".
Now he haven't scrolled. He just touched and didn't moved. I builded a workaround for this.

Code: Select all

articleViewPager.TouchStart(Location.LowerCenter);
articleViewPager.TouchMove(Location.UpperCenter); 
articleViewPager.TouchEnd(Location.UpperCenter);
if(deviceName == "Nexus 7"){
    Delay.Milliseconds(20);
    articleViewPager.TouchStart(0,50);
    articleViewPager.TouchMove(0,60);
    articleViewPager.TouchEnd(0,60);
}
This interrupted the scrolling-action and should make it possible to make a screenshot. After this worked sluggish i decided to take some more devices and test my code on this devices. I tried this code on the "Desire S" and the "Samsung Mini". On both devices the code shown some strange reactions. I activated the developing tools from the smartphones to have a closer look about the forced actions. After starting the test run i've seen the action and could follow the automatisation steps. The main problem on these devices is that despite the action is forced nothing happend. I see how he touches the location, see how he moves to the top, see how he end his touch on the top. But the application isn't scrolling.
I tried this tests on some other devices and i've got the exact same result.

Now here are the questions:
Is there any possible functions or API-Elements to scroll safely? Is there any possible functions or code snippets that checks if the end of an webView-element (android-element) is reached (Scrolling Down/Y-coordinade/Blue-Overscrolling-Gradient) if the normal way for checking the y-choordinade isn't possible?

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

Re: Android Testing Movement Problems on diverent devices

Post by Support Team » Wed Sep 11, 2013 5:14 pm

Hello,

There is a possible way to scroll to the border of an item using the percentage of the element rectangle.
It would be possible to scroll to an end of an item using the percentage of the element rectangle.
Please take a look at our API documentation:
http://www.ranorex.com/Documentation/Ra ... Move_2.htm
http://www.ranorex.com/Documentation/Ra ... hEnd_2.htm

I think you used the incorrect location in the third method (Location.LowerCenter instead of Location.UpperCenter). Is it working if you use the following methods?

Code: Select all

articleViewPager.TouchStart(Location.LowerCenter, 500);
articleViewPager.TouchMove(Location.UpperCenter, 500); 
articleViewPager.TouchEnd(Location.UpperCenter, 500);
Could you please post or send us ([email protected]) a 'Ranorex Snapshot' of your application?
Please take a look at Creating Ranorex Snapshot Files in our User Guide.
Would it be possible to get your APK file in order to reproduce your issue?

Thanks in advance.

Regards,
Markus (T)
.
Image

ArminSeidling
Posts: 4
Joined: Thu Sep 05, 2013 1:41 pm

Re: Android Testing Movement Problems on diverent devices

Post by ArminSeidling » Thu Sep 12, 2013 5:26 am

Hey,

oh thats bad so i have to build a workaround...
Sorry about that failure in this example the code still was

Code: Select all

articleViewPager.TouchStart(Location.LowerCenter, 500);
articleViewPager.TouchMove(Location.UpperCenter, 500);
articleViewPager.TouchEnd(Location.UpperCenter, 500);
not

Code: Select all

articleViewPager.TouchStart(Location.LowerCenter, 500);
articleViewPager.TouchMove(Location.UpperCenter, 500);
articleViewPager.TouchEnd(Location.LowerCenter, 500);
I'm gonna take a Snapshot and will send it to you.
We already sent the apk to Markus Ebner, from the technical support by mail.

Thanks for your Help.

Regards,
Armin.

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

Re: Android Testing Movement Problems on diverent devices

Post by Support Team » Fri Sep 13, 2013 10:18 am

Hello,

Thank you for your snapshot.

Regards,
Markus (T)
.
Image