public void Bugzilla39530PanTest() { AppRect frameBounds = RunningApp.Query(q => q.Marked("frame"))[0].Rect; RunningApp.Pan(new Drag(frameBounds, frameBounds.X + 10, frameBounds.Y + 10, frameBounds.X + 100, frameBounds.Y + 100, Drag.Direction.LeftToRight)); RunningApp.WaitForElement(q => q.Marked("Panning: Completed")); }
public void Bugzilla39530PanTest() { // Got to wait for the element to be visible to the UI test framework, otherwise we get occasional // index out of bounds exceptions if the query for the frame and its Rect run quickly enough RunningApp.WaitForElement(q => q.Marked("frame")); AppRect frameBounds = RunningApp.Query(q => q.Marked("frame"))[0].Rect; RunningApp.Pan(new Drag(frameBounds, frameBounds.CenterX, frameBounds.Y + 10, frameBounds.X + 100, frameBounds.Y + 100, Drag.Direction.LeftToRight)); RunningApp.WaitForElement(q => q.Marked("Panning: Completed")); }
public void IsRefreshingAndCommandTest_SwipeDown() { RunningApp.WaitForElement(q => q.Marked("IsRefreshing: False")); var container = RunningApp.WaitForElement("LayoutContainer")[0]; RunningApp.Pan(new Drag(container.Rect, Drag.Direction.TopToBottom, Drag.DragLength.Medium)); RunningApp.WaitForElement(q => q.Marked("IsRefreshing: True")); RunningApp.Screenshot("Refreshing"); RunningApp.WaitForElement(q => q.Marked("IsRefreshing: False")); RunningApp.Screenshot("Refreshed"); }
public void DelayedIsRefreshingAndCommandTest_SwipeDown() { var collectionView = RunningApp.WaitForElement(q => q.Marked("CollectionView7803"))[0]; RunningApp.Pan(new Drag(collectionView.Rect, Drag.Direction.TopToBottom, Drag.DragLength.Medium)); RunningApp.WaitForElement(q => q.Marked("Count: 20")); RunningApp.WaitForNoElement(q => q.Marked("Count: 30")); AppResult[] lastCellResults = null; RunningApp.QueryUntilPresent(() => { RunningApp.DragCoordinates(collectionView.Rect.CenterX, collectionView.Rect.Y + collectionView.Rect.Height - 50, collectionView.Rect.CenterX, collectionView.Rect.Y + 5); lastCellResults = RunningApp.Query("19"); return(lastCellResults); }, 10, 1); Assert.IsTrue(lastCellResults?.Any() ?? false); }
void TriggerRefresh() { var container = RunningApp.WaitForElement("LayoutContainer")[0]; RunningApp.Pan(new Drag(container.Rect, Drag.Direction.TopToBottom, Drag.DragLength.Medium)); }