public void Issue1614Test() { RunningApp.SetOrientationPortrait(); RunningApp.WaitForElement(x => x.Class("UITextField")); RunningApp.Tap(x => x.Class("UITextField").Index(0)); CheckPickerAccessory("UIPickerView"); RunningApp.SetOrientationLandscape(); CheckPickerAccessory("UIPickerView"); RunningApp.SetOrientationPortrait(); RunningApp.DismissKeyboard(); RunningApp.Tap(x => x.Class("UITextField").Index(1)); CheckPickerAccessory("UIDatePicker"); RunningApp.SetOrientationLandscape(); CheckPickerAccessory("UIDatePicker"); RunningApp.SetOrientationPortrait(); RunningApp.DismissKeyboard(); RunningApp.Tap(x => x.Class("UITextField").Index(2)); CheckPickerAccessory("UIDatePicker"); RunningApp.SetOrientationLandscape(); CheckPickerAccessory("UIDatePicker"); RunningApp.SetOrientationPortrait(); RunningApp.DismissKeyboard(); }
public void Execute() { RunningApp.EnterText("batch", string.Join("", _buttons)); RunningApp.DismissKeyboard(); RunningApp.Tap(Ids.Batch); foreach (var result in _result) RunningApp.WaitForElement(q => q.Marked($"{result}")); _buttons.Clear(); _result.Clear(); }
public void UnfocusingPasswordDoesNotHang() { RunningApp.WaitForElement(Entry); RunningApp.WaitForElement(Password); RunningApp.EnterText(Entry, "test"); RunningApp.DismissKeyboard(); RunningApp.EnterText(Password, "test"); RunningApp.Tap(Entry); RunningApp.DismissKeyboard(); RunningApp.WaitForElement(Success); }
public void TestCursorPositionAndSelection() { RunningApp.WaitForElement("CursorTextEntry"); RunningApp.ClearText("CursorStart"); RunningApp.EnterText("CursorStart", "2"); RunningApp.ClearText("SelectionLength"); RunningApp.EnterText("SelectionLength", "3"); RunningApp.DismissKeyboard(); RunningApp.Tap("Update"); RunningApp.Screenshot("Text selection from char 2 length 3."); RunningApp.Tap("CursorTextEntry"); Assert.AreEqual("0", RunningApp.WaitForElement("SelectionLength")[0].ReadText()); }
public void TableViewEntryCellShowsDefaultKeyboardThenNumericKeyboardAfterScrolling() { RunningApp.ScrollDown(); RunningApp.ScrollDown(); RunningApp.Tap(x => x.Marked("0")); var e = RunningApp.Query(c => c.Marked("0").Parent("UITextField").Index(0).Invoke("keyboardType")) [0]; //8 DecimalPad Assert.AreEqual(8, e); RunningApp.DismissKeyboard(); RunningApp.Tap(x => x.Marked("Enter text here").Index(0).Parent()); RunningApp.ScrollUp(); RunningApp.Tap(x => x.Marked("Enter text here 1")); RunningApp.Tap(x => x.Marked("Enter text here 2").Index(0).Parent()); var e1 = RunningApp.Query(c => c.Marked("Enter text here 2").Parent("UITextField").Index(0).Invoke("keyboardType")) [0]; Assert.AreEqual(0, e1); }
public void Bugzilla33578Test() { RunningApp.ScrollDown(); RunningApp.ScrollDown(); RunningApp.Tap(x => x.Marked("0")); var e = RunningApp.Query(c => c.Marked("0").Parent("UITextField").Index(0).Invoke("keyboardType")) [0]; //8 DecimalPad Assert.AreEqual(8, e); RunningApp.DismissKeyboard(); RunningApp.Tap(x => x.Marked("Enter text here").Index(0).Parent()); RunningApp.ScrollUp(); RunningApp.Tap(x => x.Marked("Enter text here 1")); RunningApp.Tap(x => x.Marked("Enter text here 2").Index(0).Parent()); var e1 = RunningApp.Query(c => c.Marked("Enter text here 2").Parent("UITextField").Index(0).Invoke("keyboardType")) [0]; Assert.AreEqual(0, e1); }
public void EntryScrollTest() { RunningApp.Tap(EntryTest); var originalPosition = RunningApp.WaitForElement(EntrySuccess)[0].Rect; RunningApp.Tap(EntryToClick); RunningApp.EnterText(EntryToClick, "keyboard"); // if the device has too much height then try clicking the second entry // to trigger keyboard movement if (RunningApp.Query(EntrySuccess).Length != 0) { RunningApp.Tap(ResetKeyboard); RunningApp.DismissKeyboard(); RunningApp.Tap(EntryToClick2); RunningApp.EnterText(EntryToClick2, "keyboard"); } var entry = RunningApp.Query(EntrySuccess); // ios10 on appcenter for some reason still returns this entry // even though it's hidden so this is a fall back test just to ensure // that the entry has scrolled up if (entry.Length > 0 && entry[0].Rect.Y > 0) { Thread.Sleep(2000); entry = RunningApp.Query(EntrySuccess); if (entry.Length > 0) { Assert.Less(entry[0].Rect.Y, originalPosition.Y); } } RunningApp.Tap(ResetKeyboard); var finalPosition = RunningApp.WaitForElement(EntrySuccess)[0].Rect; // verify that label has returned to about the same spot var diff = Math.Abs(originalPosition.Y - finalPosition.Y); Assert.LessOrEqual(diff, 2); }