public static void SearchFor (this IApp app, Platform platform, string searchString)
		{
			var ios = platform == Platform.iOS;

			app.Tap (x => x.Id (ios ? "button_add" : "action_search"));

			app.Screenshot ("Start Search");


			try {

				// type in each char one at a time
				foreach (var item in searchString)
					app.EnterText (item.ToString ());

			} catch (Exception) {

				// clear and try again
				app.ClearText ();

				foreach (var item in searchString)
					app.EnterText (ios ? "Search" : "search_src_text", item.ToString ());

			}

			app.Screenshot ($"Locations Search: '{searchString}'");
		}
Beispiel #2
0
 public static void WaitForElementThenEnterText(this IApp app, string element, bool scrollTo, string text, TimeSpan? timeout = null)
 {
     if (scrollTo)
         app.ScrollTo(element);
     
     app.WaitForElement(element, timeout: timeout);
     app.ClearText(element);
     app.EnterText(element, text);
     app.DismissKeyboard();
 }
 public static void WaitForThenClearText(this IApp app, Func<AppQuery, AppQuery> lambda)
 {
     WaitFor(app, lambda);
     app.DoubleTap(lambda);
     app.ClearText();
 }
 public static void SetText(this NSTextView textView, string text)
 {
     textView.ClearText();
     textView.InsertText(text.ValueOrEmpty().ToNSString());
 }