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"); }
void AssertIsClipped(bool expected) { if (RunningApp.IsApiHigherThan(21)) { var cliptoOutlineValue = RunningApp.InvokeFromElement <bool>(SecondaryFrame, GetClipToOutline)[0]; Assert.AreEqual(expected, cliptoOutlineValue); } else if (RunningApp.IsApiHigherThan(19)) { var clipBounds = RunningApp.InvokeFromElement <object>(SecondaryFrame, GetClipBounds)[0]; if (expected) { Assert.IsNotNull(clipBounds); } else { Assert.IsNull(clipBounds); } } else { var clipChildrenValue = RunningApp.InvokeFromElement <bool>(SecondaryFrame, GetClipChildren)[0]; Assert.AreEqual(expected, clipChildrenValue); } }
public void ScrollListViewInsideScrollView() { #if __ANDROID__ if (!RunningApp.IsApiHigherThan(21)) { return; } #endif RunningApp.WaitForElement("1"); RunningApp.ScrollDownTo("30", strategy: ScrollStrategy.Gesture); }