Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void ScrollUpFromCenterYToTopOfElement(string id)
- {
- _app.WaitForElement(id);
- var element = _app.Query(e => e.Id(id)).First().Rect;
- DragFromElementCenterToDestination(element, element.CenterX, element.Y);
- }
- public void ScrollDownFromCenterYToBottomOfElement(string id)
- {
- _app.WaitForElement(id);
- var element = _app.Query(e => e.Id(id)).First().Rect;
- var bottomOfElement = element.Y + element.Height;
- DragFromElementCenterToDestination(element, element.CenterX, bottomOfElement);
- }
- private void DragFromElementCenterToDestination(AppRect rect, float destinationX, float destinationY)
- {
- _app.DragCoordinates(
- rect.CenterX,
- rect.CenterY,
- destinationX,
- destinationY
- );
- }
Add Comment
Please, Sign In to add comment