public void ScrollListViewInsideScrollView() { #if __ANDROID__ if (!RunningApp.IsApiHigherThan(21)) { return; } #endif RunningApp.WaitForElement("1"); 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"); }
public void TableViewScroll() { TapInFlyout(TableViewTitle); RunningApp.WaitForElement(TableViewId); RunningApp.ScrollDownTo("entry30", TableViewId, ScrollStrategy.Gesture, swipePercentage: 0.20, timeout: TimeSpan.FromMinutes(1)); }
void ScrollListInPage(string tabName) { RunningApp.WaitForElement(tabName); RunningApp.Tap(tabName); RunningApp.ScrollDownTo(Cell, ListMain, ScrollStrategy.Programmatically, 0.7, timeout: TimeSpan.FromMinutes(1)); RunningApp.ScrollUpTo("California #1", ListMain, ScrollStrategy.Programmatically, 0.7, timeout: TimeSpan.FromMinutes(1)); }
public void ScrollListViewInsideScrollView() { #if __ANDROID__ if (!RunningApp.IsApiHigherThan(21)) { return; } #endif RunningApp.WaitForElement("1"); RunningApp.ScrollDownTo("30", strategy: ScrollStrategy.Gesture); }
public void Bugzilla40704Test() { RunningApp.ScrollDownTo("btnCollappse", "lstMain", ScrollStrategy.Gesture, 0.8, timeout: TimeSpan.FromMinutes(2)); RunningApp.Tap("btnCollappse"); RunningApp.ScrollDownTo("btnCollappse", "lstMain", ScrollStrategy.Gesture, 0.8, timeout: TimeSpan.FromMinutes(2)); RunningApp.Tap("btnCollappse"); RunningApp.ScrollDownTo("btnCollappse", "lstMain", ScrollStrategy.Gesture, 0.8, timeout: TimeSpan.FromMinutes(2)); RunningApp.Tap("btnCollappse"); RunningApp.WaitForElement("Menu - 2"); RunningApp.WaitForElement("Menu - 1"); RunningApp.WaitForElement("Menu - 0"); }
public void ContextActionsScrollNRE() { RunningApp.TouchAndHold(q => q.Marked("Item #0")); RunningApp.WaitForElement(q => q.Marked("Test Item")); int counter = 0; while (counter < 5) { RunningApp.ScrollDownTo("Item #15", "mainList", ScrollStrategy.Gesture, timeout: TimeSpan.FromMinutes(1)); RunningApp.ScrollUpTo("Item #0", "mainList", ScrollStrategy.Gesture, timeout: TimeSpan.FromMinutes(1)); counter++; } RunningApp.Screenshot("If the app did not crash, then the test has passed."); }
public void Bugzilla40704Test() { RunningApp.ScrollDownTo(Collapse, List, ScrollStrategy.Gesture, 0.9, 500, timeout: TimeSpan.FromMinutes(2)); RunningApp.Tap(Collapse); Task.Delay(1000).Wait(); // Let the layout settle down RunningApp.ScrollDownTo(Collapse, List, ScrollStrategy.Gesture, 0.9, 500, timeout: TimeSpan.FromMinutes(2)); RunningApp.Tap(Collapse); Task.Delay(1000).Wait(); // Let the layout settle down RunningApp.ScrollDownTo(Collapse, List, ScrollStrategy.Gesture, 0.9, 500, timeout: TimeSpan.FromMinutes(2)); RunningApp.Tap(Collapse); RunningApp.WaitForElement("Menu - 2"); RunningApp.WaitForElement("Menu - 1"); RunningApp.WaitForElement("Menu - 0"); }
public void Issue7167Test() { // arrange // add items to the list and scroll down till item "25" RunningApp.Screenshot("Empty ListView"); RunningApp.Tap(q => q.Button(AddRangeCommandId)); RunningApp.Tap(q => q.Button(AddRangeCommandId)); RunningApp.WaitForElement(c => c.Index(25).Property("Enabled", true)); RunningApp.Print.Tree(); RunningApp.ScrollDownTo(a => a.Marked("25").Property("text").Contains("25"), b => b.Marked(ListViewId), ScrollStrategy.Auto); RunningApp.WaitForElement(x => x.Marked("25")); // act // when adding additional items via a addrange and a CollectionChangedEventArgs.Action.Reset is sent // then the listview shouldnt reset or it should not scroll to the top RunningApp.Tap(q => q.Marked(AddRangeCommandId)); // assert // assert that item "25" is still visible var result = RunningApp.Query(x => x.Marked(ListViewId).Child().Marked("25")); Assert.That(result?.Length <= 0); }
public void FrameSizeGetsCorruptedWhenListViewIsScrolled() { RunningApp.WaitForElement(StartText1); var start = GetLabels(RunningApp, StartText1); var smalls = GetLabels(RunningApp, SmallText1); var bigs = GetLabels(RunningApp, BigText1); RunningApp.ScrollDownTo(EndText1, List1, ScrollStrategy.Gesture, 0.9, 15000, timeout: TimeSpan.FromMinutes(1)); RunningApp.ScrollUpTo(StartText1, List1, ScrollStrategy.Gesture, 0.9, 15000, timeout: TimeSpan.FromMinutes(1)); var startAfter = GetLabels(RunningApp, StartText1); Assert.IsTrue(RectIsEquals(start, startAfter)); var smallAfter = GetLabels(RunningApp, SmallText1); Assert.IsTrue(RectIsEquals(smalls, smallAfter)); var bigAfter = GetLabels(RunningApp, BigText1); Assert.IsTrue(RectIsEquals(bigs, bigAfter)); // list2 with ListViewCachingStrategy.RecycleElement - issue 6297 RunningApp.WaitForElement(StartText2); start = GetLabels(RunningApp, StartText2); smalls = GetLabels(RunningApp, SmallText2); bigs = GetLabels(RunningApp, BigText2); RunningApp.ScrollDownTo(EndText2, List2, ScrollStrategy.Gesture, 0.9, 15000, timeout: TimeSpan.FromMinutes(1)); RunningApp.ScrollUpTo(StartText2, List2, ScrollStrategy.Gesture, 0.9, 15000, timeout: TimeSpan.FromMinutes(1)); startAfter = GetLabels(RunningApp, StartText2); Assert.IsTrue(RectIsEquals(start, startAfter)); smallAfter = GetLabels(RunningApp, SmallText2); Assert.IsTrue(RectIsEquals(smalls, smallAfter)); bigAfter = GetLabels(RunningApp, BigText2); Assert.IsTrue(RectIsEquals(bigs, bigAfter)); }
public void ListViewScroll() { TapInFlyout(ListViewTitle); RunningApp.WaitForElement(ListViewId); RunningApp.ScrollDownTo("30 Entry", ListViewId, ScrollStrategy.Gesture); }
public void TableViewScroll() { TapInFlyout(TableViewTitle); RunningApp.WaitForElement(TableViewId); RunningApp.ScrollDownTo("entry30", TableViewId, ScrollStrategy.Gesture); }