Skip to content

Instantly share code, notes, and snippets.

@SmartyP
Last active December 15, 2019 08:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save SmartyP/4e143f0d3e74772a2c4dfc3075e7ae7c to your computer and use it in GitHub Desktop.
Save SmartyP/4e143f0d3e74772a2c4dfc3075e7ae7c to your computer and use it in GitHub Desktop.
REPL Cheat Sheet
app.Query() // shows all details on tree that are visible (use All flag for all)
app.DismissKeyboard();
app.Back();
app.Flash(query) // flash/flicker the element so you can see it and make sure it’s the right one
app.WaitFor(); // wait for some amount of time
app.WaitForElement(); // wait for an element to be available
app.WaitForNoElement(); // wait for an element to not be available
app.Tap(c=>c.Marked(“Add Task”)); // tap something marked as Add Task
app.Tap(c=>c.Class(“UINavigationButton”)); // tap the first navigation button found
app.Query(c=>c.Button().Marked(“Add”)); // marked looks for id, or text
app.Query(c=>c.Id(“menu_add_task”)); // gets field with id
app.Query(c=>c.Text(“My Text”)); // gets field with certain text
app.Query(c=>c.Class(“UILabel”));
app.Query(c=>c.TextField()); // same as above
app.Query(e => e.All().Property("hint", "Search")); // Finds elements that have a "hint" property with value of "Search"
app.Flash(c=>c.Button().Marked(“Add”));
app.Flash(c=>c.Marked(“Name”));
app.Tap(x=>x.Id(“my-webview”).Css(“#my-button”));
app.Tap(c=>c.Button("Add"));
app.Tap(“Add”); // same as above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment