public void AppLaunches() { app.Flash(x => x.Id("txt")); app.Tap(x => x.Id("txt")); app.Tap(x => x.Text("Technology")); Thread.Sleep(TimeSpan.FromSeconds(4)); app.Screenshot("Flashed and Tapped 'All' button, then Tapped 'Technology' button"); app.Flash(x => x.Id("ab_refresh")); app.Tap(x => x.Id("ab_refresh")); app.Screenshot("Flashed and Tapped refresh button"); app.Flash(x => x.Id("ab_search")); app.Tap(x => x.Id("ab_search")); app.EnterText("Microsoft"); app.Screenshot("Entered Microsoft"); Thread.Sleep(TimeSpan.FromSeconds(2)); app.PressEnter(); app.Screenshot("Searched for 'Microsoft' in the Search Bar"); app.ScrollDown(); Thread.Sleep(TimeSpan.FromSeconds(1)); app.ScrollDown(); Thread.Sleep(TimeSpan.FromSeconds(1)); app.Screenshot("Swiped down a few times"); app.WaitForElement(x => x.Marked("Facebook, Microsoft to Run Mega-Cable From Va. to Spain")); app.Flash(x => x.Marked("Facebook, Microsoft to Run Mega-Cable From Va. to Spain")); app.Screenshot("Flashed Microsoft News Article"); Thread.Sleep(TimeSpan.FromSeconds(2)); app.Tap(x => x.Marked("Facebook, Microsoft to Run Mega-Cable From Va. to Spain")); app.Screenshot("Tapped on Microsoft and Facebook Article'"); }
public void SpecFlow_VerkenHoofdscherm() { int lengte1 = 0; int lengte2 = 0; app.WaitForElement(c => c.Id("action_bar")); app.Flash(c => c.Id("plusButton")); app.Tap(c => c.Id("plusButton")); app.Tap(c => c.Id("plusButton")); app.Tap(c => c.Id("plusButton")); app.Flash(c => c.Id("minButton")); app.Tap(c => c.Id("minButton")); app.Tap(c => c.Id("minButton")); app.Flash(c => c.Id("route1Button")); app.Tap(c => c.Id("route1Button")); var resultlengte1 = app.Query(c => c.Id("lengte").Invoke("getText")); if (resultlengte1[0].ToString() != null) { lengte1 = Int32.Parse(resultlengte1[0].ToString()); } app.Flash(c => c.Id("route2Button")); app.Tap(c => c.Id("route2Button")); app.Flash(c => c.Id("lengte")); var resultlengte2 = app.Query(c => c.Id("lengte").Invoke("getText")); if (resultlengte2[0].ToString() != null) { lengte2 = Int32.Parse(resultlengte2[0].ToString()); } //bij 11 punten is de lengte soms gelijk Assert.GreaterOrEqual(lengte2, lengte1); }
public void AppLaunches() { //Carousel Swipe app.SwipeRightToLeft(); app.WaitForElement(x => x.Id("NoResourceEntry-1")); app.SwipeRightToLeft(); app.WaitForElement(x => x.Id("NoResourceEntry-2")); app.SwipeRightToLeft(); app.WaitForElement(x => x.Id("NoResourceEntry-3")); app.SwipeRightToLeft(); app.Screenshot("LoginPage"); //Login Credentials app.WaitForElement(x => x.Marked("Email address")); app.Tap(x => x.Index(48)); app.EnterText("*****@*****.**"); app.DismissKeyboard(); app.Tap(x => x.Button("btnContinue")); app.WaitForElement(x => x.Marked("PIN")); app.EnterText("6804"); app.DismissKeyboard(); app.Tap(x => x.Button("btnContinue")); app.Screenshot("Logging in with my credentials"); //End of Introduction app.WaitForElement(x => x.Marked("NEXT")); app.Flash(x => x.Marked("NEXT")); app.Tap(x => x.Marked("NEXT")); app.Tap(x => x.Marked("NEXT")); app.Tap(x => x.Marked("NEXT")); app.Tap(x => x.Marked("OK, GOT IT")); app.Screenshot("End of Introduction"); app.Back(); //Hollenbeck Home app.Flash(x => x.Marked("Hollenbeck Home")); app.Tap(x => x.Marked("Hollenbeck Home")); app.WaitForElement(x => x.Marked("SCHEDULE A TOUR")); app.ScrollDownTo(x => x.Marked("MORE")); app.Tap(x => x.Marked("Prices (starting at)")); Thread.Sleep(TimeSpan.FromSeconds(3)); app.Screenshot("Hollenbeck Home Info"); app.Back(); app.Repl(); }
public void WhenIkKlikMaalOpDeMinbutton(int nklik) { app.WaitForElement(c => c.Id("minButton")); app.Flash(c => c.Id("minButton")); for (int i = 1; i <= nklik; i++) { app.Tap(c => c.Id("minButton")); } }
public void AppLaunches() { app.WaitForElement(x => x.Id("race_cell")); app.Flash(x => x.Id("race_cell").Index(0)); app.Tap(x => x.Id("race_cell").Index(0)); app.WaitForElement(june => june.Id("tab_title").Text("TICKETS")); app.Tap(june => june.Id("tab_title").Text("TICKETS")); }
public void login() { Thread.Sleep(20000); app.SwipeRightToLeft(); app.SwipeRightToLeft(); app.SwipeRightToLeft(); app.Tap(x => x.Id("alreadyHaveAccountButton")); app.Tap("Email"); app.EnterText(final_email); app.Tap("Password"); app.EnterText("magicA123"); app.ScrollDownTo("Sign me in!", strategy: ScrollStrategy.Gesture, timeout: new TimeSpan(0, 1, 0)); app.Tap(x => x.Id("signInButton")); Thread.Sleep(10000); var isAccountSafeBox = app.Query("Keep your account (and your points!) extra safe").Any(); if (isAccountSafeBox == true) { app.Tap("I'll skip this"); } var isAddCode = app.Query(x => x.Id("pop_up_title")).Any(); if (isAddCode == true) { app.Flash("Add code now"); app.Tap("Not now"); } b_ProfileUpdate(); i_anotherchild(); c_pamper_reward(); e_menubar(); f_MyDetails(); g_changepassword(); home_ParentsHub(); // home_GetMorePoints(); d_logout(); }
public void UI_TEST_DE_UAT() { string str = generator.RandomString(3, false); int rand = generator.RandomNumber(3, 100); string randomnumber = rand.ToString(); string email = String.Concat(str, randomnumber); string remain = "@pampers.com"; EmailFinal = String.Concat("john.", email, remain); Thread.Sleep(20000); app.SwipeRightToLeft(); app.SwipeRightToLeft(); app.SwipeRightToLeft(); Thread.Sleep(7000); app.Flash(x => x.Id("alreadyHaveAccountButton")); app.Tap(x => x.Id("joinNowButton")); Thread.Sleep(7000); app.Tap(x => x.Id("firstNameEditText")); app.EnterText("John"); app.Tap(x => x.Id("textViewContent")); app.Tap("OK"); app.ScrollDownTo("Email", strategy: ScrollStrategy.Gesture); app.Tap(x => x.Id("emailEditText")); app.EnterText(EmailFinal); app.ScrollDownTo("Password", strategy: ScrollStrategy.Gesture); app.Tap("Password"); app.EnterText("magicA123"); app.Tap(x => x.Id("joinNowButton")); Thread.Sleep(5000); app.Tap(x => x.Id("gdprContentScrollView")); app.ScrollDown(strategy: ScrollStrategy.Gesture); app.ScrollDown(strategy: ScrollStrategy.Gesture); app.ScrollDown(strategy: ScrollStrategy.Gesture); app.ScrollDown(strategy: ScrollStrategy.Gesture); Thread.Sleep(2000); app.Tap(x => x.Id("gdprCTABtn")); Thread.Sleep(5000); Logout(); Login(); }
public void AppLaunches() { //Arrange //Act app.Flash(x => x.Id("login_button")); app.Tap(x => x.Id("login_button")); app.Repl(); }
public void AppLaunches() { app.WaitForElement(x => x.Text(("Use my phone number"))); app.Flash(x => x.Text("Use my phone number")); app.Tap(x => x.Text("Use my phone number")); app.Screenshot("Phone Number Field"); app.Tap(x => x.Id("dgts__countryCode")); app.Screenshot("Country Code Field"); app.ScrollDownTo((x => x.Id("text1").Text("United States +1"))); app.Tap(x => x.Id("text1").Text("United States +1")); app.Screenshot("Scrolling down to United States Field"); app.EnterText("4087188819"); app.Screenshot("Phone number Field"); app.Tap((x => x.Text("Continue"))); }
// [Test] public void AppLaunches() { var model = new Model(); app.Screenshot("First screen."); // var all = app.Query (c => c.All ()); // // var ff = app.Query (); var loginButton = app.Query(model.EmailLogin); var text = loginButton.First().Text; // app.Flash(c=>c.Marked("al_btn_email_login")); app.Tap(c => c.Marked("al_btn_email_login")); app.Tap(c => c.Marked("al_input_email")); app.EnterText("*****@*****.**"); app.Tap(c => c.Marked("al_input_password")); app.EnterText("b"); app.PressEnter(); app.Tap(c => c.Marked("al_btn_email_login")); app.WaitForElement(c => c.Marked("follow_artist_list")); // app.Repl(); app.Screenshot("Logged in."); app.Flash((c => c.Marked("follow_button_follow").Index(0))); app.Tap(c => c.Marked("follow_button_follow").Index(0)); app.Tap(c => c.Marked("follow_btn_done")); }
public void AppLaunches() { app.Repl(); app.Flash(); }
// [TestCase] public void NewTest() { app.Tap(x => x.Class("EntryEditText")); app.Screenshot("Tapped on view with class: EntryEditText"); // step 2 app.EnterText(x => x.Class("EntryEditText"), "sandy"); app.PressEnter(); app.Tap(x => x.Class("EntryEditText").Index(1)); app.EnterText(x => x.Class("EntryEditText").Index(1), "engg"); app.PressEnter(); app.Tap(x => x.Class("EntryEditText").Index(2)); app.EnterText(x => x.Class("EntryEditText").Index(2), "public"); app.Tap(x => x.Class("EntryEditText").Index(3)); app.EnterText(x => x.Class("EntryEditText").Index(3), "*****@*****.**"); app.Tap(x => x.Class("EntryEditText").Index(4)); app.EnterText(x => x.Class("EntryEditText").Index(4), "1234567890"); app.PressEnter(); app.Screenshot("Pressed enter key"); // step 3 app.Tap(x => x.Text("GET STARTED")); app.Screenshot("Tapped on view with class: Button with text: GET STARTED"); // step 4 app.Tap(x => x.Text("NEW PROJECT")); app.WaitForElement(x => x.Marked("SiteName")); app.Screenshot("Tapped on view with class: FormsTextView with text: Copy project settings from\nanother project"); // step 5 app.Tap(x => x.Marked("siteName")); app.EnterText(x => x.Marked("siteName"), "first"); app.PressEnter(); app.Tap(x => x.Marked("EntrySiteLoc")); app.EnterText(x => x.Marked("EntrySiteLoc"), "germany"); app.PressEnter(); app.Tap(x => x.Text("Project Type").Index(1)); app.TouchAndHold(x => x.Text("Commercial")); app.Screenshot("Long press on view with class: Platform_DefaultRenderer"); // step 6 app.TouchAndHold(x => x.Text("Advanced Settings")); app.Screenshot("Entered text: D"); // step 7 app.Tap(x => x.Text("02")); app.Screenshot("Entered text: 02"); // step 8 for (int i = 0; i < 2; i++) { app.ScrollDown(); if ((app.Query(x => x.Marked("Panel Languages"))).Length > 0) { break; } } app.Screenshot("Scrolled for the Panel Language"); // step 9 app.Tap(x => x.Class("EditText").Index(2)); app.Screenshot("Tapped on view with class: EditText"); // step 10 app.Tap(x => x.Id("button1")); app.Screenshot("Tapped on OK"); // step 11 for (int i = 0; i < 2; i++) { app.ScrollDown(); if ((app.Query(x => x.Marked("No of repeaters"))).Length > 0) { break; } } // step 12 app.Tap(x => x.Text("+").Index(1)); app.Tap(x => x.Text("+").Index(1)); app.Tap(x => x.Text("+").Index(1)); app.Tap(x => x.Text("+").Index(1)); app.Tap(x => x.Text("+").Index(1)); //app.Tap(x => x.Text("+").Index(2)); //app.Tap(x => x.Text("+").Index(2)); //app.Tap(x => x.Text("+").Index(2)); //app.Tap(x => x.Text("+").Index(2)); //app.Tap(x => x.Text("+").Index(2)); app.Screenshot("Tapped on view with class: Button with text: +"); // step app.Back(); app.Tap(x => x.Text("CREATE")); app.Screenshot("Tapped on view with class: Button with text: CREATE"); //for (int i = 0; i < 6; i++) //{ // app.Back(); // if ((app.Query(x => x.Marked("Do you really want to exit?"))).Length > 0) // { // break; // } // for (i = 0; i < 2000; i++) // { // ; // } //} //app.Screenshot("about to exit"); //app.Tap(x => x.Id("button1")); //app.Screenshot("app closed"); //BeforeEachTest(); //app.Screenshot("reopen"); // step app.TouchAndHold(x => x.Text("first")); app.Screenshot("Long press on view with class: Platform_DefaultRenderer"); // step app.Tap(x => x.Text("NEW PANEL")); app.Screenshot("Tapped on view with class: Button with text: NEW PANEL"); // step app.Tap(x => x.Class("EntryEditText")); app.EnterText(x => x.Class("EntryEditText"), "dxc"); app.PressEnter(); app.Screenshot("dxc"); // step app.Tap(x => x.Class("EntryEditText").Index(1)); app.EnterText(x => x.Class("EntryEditText").Index(1), "first floor"); app.PressEnter(); app.Screenshot("Pressed enter key"); // step app.Tap(x => x.Text("CREATE")); app.Screenshot("Tapped on view with class: Button with text: CREATE"); // step app.TouchAndHold(x => x.Text("dxc")); app.Screenshot("pressed DXC"); // step app.TouchAndHold(x => x.Text("Devices")); app.Screenshot("Long press on view with class: FormsImageView"); // step app.TouchAndHold(x => x.Text("Zones")); app.Screenshot("Long press on view with class: FormsTextView with text: Zones"); // step app.TouchAndHold(x => x.Text("Logics")); app.Screenshot("Long press on view with class: LOGICS"); // step app.TouchAndHold(x => x.Text("Events")); app.Screenshot("Long press on view with class: FormsTextView with text: Events"); // step app.Tap(x => x.Text("All")); app.Screenshot("press All"); // step app.ScrollDown(); app.Screenshot("press Fault"); // step app.Tap(x => x.Id("button1")); app.Screenshot("Long press on view with class: FormsImageView"); // step app.Back(); app.Screenshot("goto prev screen"); // step app.Tap(x => x.Text("QUICK CONFIGURE")); app.Screenshot("Tapped on view with class: Button with text: QUICK CONFIGURE"); // step app.Tap(x => x.Text("CONTINUE")); app.Screenshot("Tapped on view with class: Button with text: CONTINUE"); // step app.Tap(x => x.Class("EntryEditText")); app.EnterText(x => x.Class("EntryEditText"), "two"); app.PressEnter(); app.Tap(x => x.Class("EntryEditText").Index(1)); app.EnterText(x => x.Class("EntryEditText").Index(1), "second floor"); app.PressEnter(); app.Tap(x => x.Text("04")); app.Screenshot("filled the page and tap on CONTINUE"); // step app.Tap(x => x.Text("CONTINUE")); app.Screenshot("Tapped on view with class: Button with text: CONTINUE"); // step app.Tap(x => x.Text("Loop 1")); app.Screenshot("Long press on view with class: LOOP 1"); // step app.Tap(x => x.Class("EntryEditText")); app.EnterText(x => x.Class("EntryEditText"), "20"); app.PressEnter(); app.Tap(x => x.Class("EntryEditText").Index(1)); app.EnterText(x => x.Class("EntryEditText").Index(1), "0"); app.PressEnter(); app.Screenshot("added sensor and modules"); // step app.Tap(x => x.Text("DONE")); app.Screenshot("Tapped on view with class: Button with text: DONE"); // step app.Tap(x => x.Text("CONTINUE")); app.Screenshot("Tapped on view with class: Button with text: CONTINUE"); // step app.Tap(x => x.Text("SKIP")); app.Screenshot("Tapped on view with class: Button with text: SKIP"); // step app.Tap(x => x.Class("RadioButton")); app.Tap(x => x.Class("RadioButton").Index(2)); app.Tap(x => x.Class("RadioButton").Index(1)); app.Screenshot("Tapped on view with class: RadioButton"); // step app.Tap(x => x.Text("ASSIGN")); app.Screenshot("Tapped on view with class: Button with text: ASSIGN"); // step app.Tap(x => x.Class("RadioButton")); app.Tap(x => x.Class("RadioButton").Index(1)); app.Screenshot("Long press on view with class: RadioButton"); // step app.Tap(x => x.Text("DONE")); app.Screenshot("Long press on view with class: Button with text: DONE"); // step app.Tap(x => x.Text("DONE")); app.Screenshot("Tapped on view with class: Button with text: DONE"); app.Back(); app.Screenshot("panels list"); for (int i = 0; i < 6; i++) { app.Back(); if ((app.Query(x => x.Marked("Do you really want to exit?"))).Length > 0) { break; } else { continue; } } app.Screenshot("about to exit"); app.Tap(x => x.Id("button1")); app.Screenshot("app closed"); BeforeEachTest(); app.Screenshot("reopen"); app.Flash("first"); app.Screenshot("first flash"); Assert.AreEqual(app.Query(e => e.Class("FormsTextView").Index(1))[0].Text, "first"); app.Screenshot("assertion 1"); Assert.AreEqual(app.Query(e => e.Class("FormsTextView").Index(2))[0].Text, "germany"); app.Screenshot("assertion 2"); Assert.AreEqual(app.Query(e => e.Class("FormsTextView").Index(6))[0].Text, "Commercial"); app.Screenshot("assertion 3"); app.TouchAndHold(x => x.Text("first")); app.Screenshot("Long press on view with class: Platform_DefaultRenderer"); for (int i = 0; i < 20000; i++) { ; } Assert.AreEqual(app.Query(e => e.Class("FormsTextView").Index(2))[0].Text, "two"); app.Screenshot("assertion 4"); Assert.AreEqual(app.Query(e => e.Class("FormsTextView").Index(3))[0].Text, "second floor"); app.Screenshot("assertion 5"); Assert.AreEqual(app.Query(e => e.Class("FormsTextView").Index(5))[0].Text, "4"); app.Screenshot("assertion 6"); Assert.AreEqual(app.Query(e => e.Class("FormsTextView").Index(7))[0].Text, "20"); app.Screenshot("assertion 7"); Assert.AreEqual(app.Query(e => e.Class("FormsTextView").Index(12))[0].Text, "dxc"); app.Screenshot("assertion 8"); Assert.AreEqual(app.Query(e => e.Class("FormsTextView").Index(13))[0].Text, "first floor"); app.Screenshot("assertion 9"); Assert.AreEqual(app.Query(e => e.Class("FormsTextView").Index(15))[0].Text, "2"); app.Screenshot("assertion 10"); }