i need to have a swipe code example

Download and share automation modules and examples.
amielnoy
Posts: 1
Joined: Thu Aug 27, 2015 11:51 am

i need to have a swipe code example

Post by amielnoy » Wed Sep 02, 2015 2:56 pm

I am testing android number picker and need to swipe verticaly hour number.



I try to use this code but it failes with no error report

Report.Info("attempt to use swipe to set HOUR");
Delay.Seconds(1);
String CurrentHour=repo.ComIntelAaMedisenseAndroid.MedicationScheduleScreen.SetMedicationsReminders.SetTime.AndroidWidgetNumberPickerDollarCustomE.Element.GetAttributeValue("Text").ToString();
System.Int32 StepsToSwipe=Convert.ToInt32(Hour)-Convert.ToInt32(CurrentHour);
if(StepsToSwipe>0)
repo.ComIntelAaMedisenseAndroid.MedicationScheduleScreen.SetMedicationsReminders.SetTime.AndroidWidgetNumberPickerDollarCustomE.Swipe(GestureDirection.Down,10*StepsToSwipe);
else
{
StepsToSwipe=-StepsToSwipe;
repo.ComIntelAaMedisenseAndroid.MedicationScheduleScreen.SetMedicationsReminders.SetTime.AndroidWidgetNumberPickerDollarCustomE.Swipe(GestureDirection.Up,StepsToSwipe);
}


Please help
Attachments
SelectTime_Screenshot.png
SelectTime_Screenshot.png (13.62 KiB) Viewed 1559 times

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

Re: i need to have a swipe code example

Post by Support Team » Thu Sep 03, 2015 2:38 pm

Hello amielnoy,

I assume that you want to set a specific time within the time picker element, right?

It would be great if you could provide your app or a sample APK containing the time picker.
This would help me analyzing the issue.

If you want, you can also send the APK via email to [email protected].

Thank you in advance.

Regards,
Johannes
.
Image