Created
September 7, 2022 16:45
-
-
Save sjehutch/8408aa3a659ef47837843cd6e7bd2bdd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void ScrollToTop() | |
{ | |
if (app.Query(editButton).Any() && app.Query(editButton).FirstOrDefault().Text == "Done") //edit mode | |
{ | |
if (!app.Query(addButton).Any()) | |
app.ScrollUpTo("Gravity point"); | |
} | |
else | |
{ | |
var topItem = ""; | |
while (topItem != app.Query(x => x.Marked(cellTitleLabels)).FirstOrDefault().Text) | |
{ | |
topItem = app.Query(x => x.Marked(cellTitleLabels)).FirstOrDefault().Text; | |
app.ScrollUp("TableView", Xamarin.UITest.ScrollStrategy.Auto); | |
} | |
} | |
} | |
private void ScrollDownToItem(string item) | |
{ | |
ScrollToTop(); | |
if (!app.Query(x => x.Marked(cellTitleLabels).Text(item)).Any()) | |
app.ScrollDownTo(item); | |
} | |
ScrollToTop(); | |
app.Tap(insertButton); | |
return this; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment