slow down gesture scroll for ui test and let it retry (#8591)
authorShane Neuville <shneuvil@microsoft.com>
Thu, 21 Nov 2019 06:02:30 +0000 (23:02 -0700)
committerGitHub <noreply@github.com>
Thu, 21 Nov 2019 06:02:30 +0000 (23:02 -0700)
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7329.cs

index 92b7bb6..d240f20 100644 (file)
@@ -68,7 +68,22 @@ namespace Xamarin.Forms.Controls.Issues
 #endif
 
                        RunningApp.WaitForElement("1");
-                       RunningApp.ScrollDownTo("30", strategy: ScrollStrategy.Gesture);
+
+                       RunningApp.QueryUntilPresent(() =>
+                       {
+                               try
+                               {
+                                       RunningApp.ScrollDownTo("30", strategy: ScrollStrategy.Gesture, swipeSpeed: 100);
+                               }
+                               catch
+                               {
+                                       // just ignore if it fails so it can keep trying to scroll
+                               }
+
+                               return RunningApp.Query("30");
+                       });
+
+                       RunningApp.Query("30");
                }
 #endif
        }