public void ServerConnect() { app.Tap(b => b.Button("Local")); app.Tap(t => t.Text("Connect")); app.Tap(t => t.Text("OK")); app.Tap(t => t.Text("Enter name")); app.EnterText("Hestia"); app.Tap(t => t.Text("Connect")); app.Tap(t => t.Text("OK")); app.Tap(t => t.Text("Enter IP")); app.EnterText("A"); app.Tap(t => t.Text("Connect")); app.Tap(t => t.Text("OK")); app.ClearText(); app.EnterText("123"); app.Tap(t => t.Text("Connect")); app.Tap(t => t.Text("OK")); app.ClearText(); app.EnterText("0.0.0.0"); app.Tap(t => t.Text("Connect")); app.Tap(t => t.Text("OK")); app.ClearText(); app.EnterText("94.212.164.28"); app.Tap(t => t.Text("Connect")); }
public void UpdateFirstName() { app.WaitForElement(x => x.Marked("Armstead, Evan")); // wait for the list to appear app.Screenshot("App start, display list"); app.ScrollDownTo("Green, Monica"); app.Screenshot("Scrolled to Monica Green"); app.Tap(x => x.Marked("Green, Monica")); app.WaitForElement(x => x.Class("MKNewAnnotationContainerView")); // wait for the map to appear Thread.Sleep(2000); // wait 2 seconds to give map time to fully render app.Screenshot("Detail screen"); app.Tap(x => x.Id("edit.png")); app.Screenshot("Edit screen"); app.ScrollDownTo("First"); app.Tap(x => x.Marked("Monica")); app.ClearText(); app.Screenshot("Cleared first name field"); app.EnterText("Erica"); app.DismissKeyboard(); app.Screenshot("Altered value of company name field"); app.Tap(x => x.Id("save.png")); app.WaitForElement(x => x.Class("MKNewAnnotationContainerView")); // wait for the map to appear Thread.Sleep(2000); // wait 2 seconds to give map time to fully render app.Screenshot("Saved changes, navigated to detail screen, first name updated"); app.Tap(x => x.Marked("List")); app.ScrollDownTo("Green, Erica"); app.Screenshot("First name updated on list screen, first name updated"); }
public void UpdateFirstName() { app.Screenshot("App Started"); app.EnterText(x => x.Class("UITextField"), "UseLocalDataSource"); app.Screenshot("Entered data parition phrase"); app.Tap(x => x.Text("Continue")); app.WaitForElement(x => x.Marked("Armstead, Evan")); Thread.Sleep(3000); // wait a few seconds for list images to fully load app.Screenshot("Display list"); app.Tap(x => x.Marked("Armstead, Evan")); app.WaitForElement(x => x.Class("MKNewAnnotationContainerView")); // wait for the map to appear Thread.Sleep(2000); // wait 2 seconds to give map time to fully render app.Screenshot("Detail screen"); app.Tap(x => x.Id("edit.png")); app.Screenshot("Edit screen"); app.ScrollDownTo("First"); app.Tap(x => x.Marked("Evan")); app.ClearText(); app.Screenshot("Cleared first name field"); app.EnterText("Jonathan"); app.DismissKeyboard(); app.Screenshot("Altered value of first name field"); app.Tap(x => x.Id("save.png")); app.WaitForElement(x => x.Class("MKNewAnnotationContainerView")); // wait for the map to appear Thread.Sleep(2000); // wait 2 seconds to give map time to fully render app.Screenshot("Saved changes, navigated to detail screen, first name updated"); app.Tap(x => x.Marked("List")); app.Screenshot("First name updated on list screen"); }
public void UpdateFirstName() { app.Screenshot("App Started"); app.Tap(x => x.Marked("Enter a unique phrase")); app.EnterText("UseLocalDataSource"); app.Screenshot("Entered data parition phrase"); app.Tap(x => x.Marked("Continue")); Thread.Sleep(10000); // wait 10 seconds to let list and all images load app.Screenshot("App start, display list"); app.ScrollDownTo("Green, Monica"); app.Screenshot("Scrolled to Monica Green"); app.Tap(x => x.Marked("Green, Monica")); app.WaitForElement(x => x.Class("MKNewAnnotationContainerView")); // wait for the map to appear Thread.Sleep(2000); // wait 2 seconds to give map time to fully render app.Screenshot("Detail screen"); app.Tap(x => x.Id("edit.png")); app.Screenshot("Edit screen"); app.ScrollDownTo("First"); app.Tap(x => x.Marked("Monica")); Thread.Sleep(1000); app.ClearText(); app.Screenshot("Cleared first name field"); app.EnterText("Erica"); app.DismissKeyboard(); app.Screenshot("Altered value of company name field"); app.Tap(x => x.Id("save.png")); app.WaitForElement(x => x.Class("MKNewAnnotationContainerView")); // wait for the map to appear Thread.Sleep(2000); // wait 2 seconds to give map time to fully render app.Screenshot("Saved changes, navigated to detail screen, first name updated"); app.Tap(x => x.Marked("List")); app.Screenshot("First name updated on list screen, first name updated"); }
public void AppLaunches() { app.Tap(x => x.Marked("1-855-XAMARIN")); app.Screenshot("Tapped on view with class: UITextFieldLabel marked: 1-855-XAMARIN"); app.ClearText(x => x.Class("UITextField").Text("1-855-XAMARIN")); app.EnterText(x => x.Class("UITextField"), "test recorder"); app.Tap(x => x.Marked("Translate")); app.Screenshot("Tapped on view with class: UIButton marked: Translate"); }
public void EnterText() { //Arrange string typedText = "Hello world!"; string retrievedText; //Act app.Tap(MyEntry); app.ClearText(); app.Screenshot("Entry Tapped"); app.EnterText(typedText); app.DismissKeyboard(); app.Screenshot($"Entered Text: {typedText}"); //Assert retrievedText = app.Query(MyLabel).FirstOrDefault()?.Text; Assert.AreEqual(typedText, retrievedText, "The typed text does not match the text displayed on the screen"); }
public void LoweringMaxTempTurnsLabelRed() { // Let something load before proceeding app.WaitForElement(x => x.Id("JunctionTemperatureLabel")); app.Screenshot("Initial launch"); app.SetSliderValue(x => x.Class("UISlider"), 12); app.SetSliderValue(x => x.Class("UISlider").Index(1), 5); // Have to scroll down on small screens to make lower views accessible app.ScrollDown(withinMarked: "CalcScrollView"); app.SetSliderValue(x => x.Class("UISlider").Index(2), 0.5); app.Screenshot("Sliders set for 5V from 12V at 0.5A"); app.ScrollUp(withinMarked: "CalcScrollView"); app.Tap(x => x.Id("hamburger.png")); app.Screenshot("Opened settings"); app.Tap(x => x.Marked("Fahrenheit (°F)")); app.Screenshot("Tapped on view with class: UILabel marked: Fahrenheit (°F)"); app.Tap(x => x.Marked("257")); app.ClearText(x => x.Class("UITextField").Index(2)); app.EnterText(x => x.Class("UITextField").Index(2), "215"); app.Tap(x => x.Marked("Done")); app.Screenshot("Lowered max junction temperature below current temperature"); //app.Tap(x => x.Class("UIView").Index(6)); app.SwipeRightToLeft(); //app.Repl(); app.Screenshot("Closed settings"); app.WaitForElement(x => x.Id("JunctionTemperatureLabel")); var isRed = Convert.ToBoolean(app.Query(x => x.Id("JunctionTemperatureLabel"). Invoke("textColor").Invoke("red"))[0]); Assert.IsTrue(isRed); }