public void BasicFahrenheitSetup() { // Let something load before proceeding app.WaitForElement(x => x.Marked("JunctionTemperatureLabel")); app.Screenshot("Initial launch"); app.SetSliderValue(x => x.Class("FormsSeekBar").Index(0), 250); app.SetSliderValue(x => x.Class("FormsSeekBar").Index(1), 208); app.ScrollDown(); // Might be necessary on small screens app.SetSliderValue(x => x.Class("FormsSeekBar").Index(2), 50); app.Screenshot("Sliders set for 5V from 12V at 0.5A"); app.ScrollUp(); app.SetOrientationLandscape(); app.Screenshot("Setup in landscape"); app.SetOrientationPortrait(); app.Tap(x => x.Marked("OK")); app.Screenshot("Opened settings"); app.Tap(x => x.Text("Fahrenheit (°F)")); app.Screenshot("Tapped on view with class: FormsTextView"); app.SwipeRightToLeft(); app.Screenshot("Swiped left"); app.WaitForElement(x => x.Marked("JunctionTemperatureLabel")); var temperatureF = app.Query(x => x.Marked("JunctionTemperatureLabel")); Assert.IsTrue(temperatureF[0].Text.Equals("JUNCTION TEMP: 222.1 ˚F")); }
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 TestTeacherNewAccountFlow() { createAccount("teacher"); //verify that we landed on add class screen app.WaitForElement("Click here to add a class"); app.Screenshot("Teacher no class FRE screen"); app.Tap("Click here to add a class"); enterText("textInput_addClass", getRandomClassName()); app.Screenshot("teacher_create_account_flow_welcome"); app.Tap("Edit class image"); //select image id: 5 app.WaitForElement("avatar_grid_item_5"); app.Screenshot("teacher_create_account_flow_edit_class_image"); app.Tap("avatar_grid_item_5"); //ensure that the class avatar image has sifted to imageID: 5 app.WaitForElement("class_avatar_5"); app.Tap("Add class"); app.WaitForElement(x => x.Text("Class Code")); app.Screenshot("teacher_create_account_flow_add_class"); //save class code to be used later by student to join class string newClassCode = app.Query(x => x.Marked("classCodeValue")).FirstOrDefault().Text; //tap on button to add students manually app.Tap("Add students manually"); app.WaitForElement(x => x.Text("Add Manual Students")); string studentName = addManualStudent(); // test removing the added student by tapping on the remove icon app.Tap("student_card_right_comp_" + studentName); app.WaitForElement(x => x.Text("Are you sure you want to remove this student?")); app.Tap("Remove"); //verify that the student is removed app.WaitForNoElement(x => x.Text(studentName)); //add a student back again studentName = addManualStudent(); //press done button app.Tap("add_student_done_btn"); app.WaitForElement("Assignments"); app.Screenshot("teacher_create_account_flow_main"); app.Tap("Assignments"); app.WaitForElement("surah_title_touchable"); //tap on surah ToC to change surah app.WaitForElement("surah_title_touchable"); app.Tap("surah_title_touchable"); app.Screenshot("teacher_create_account_flow_surah_toc"); //type to filter surah app.WaitForElement("qc_text_input"); app.EnterText("qc_text_input", "Yus"); //tap on the fitered surah name app.WaitForElement("surahs_toc_item_Yusuf"); app.Tap("surahs_toc_item_Yusuf"); app.WaitForElement("surah_header_يوسف"); app.Screenshot("teacher_create_account_flow_surah"); //change page app.ScrollDownTo("touchable_text_page_number_235_footer"); app.Tap("touchable_text_page_number_235_footer"); app.WaitForElement("text_input_mushaf_page_number"); app.ClearText("text_input_mushaf_page_number"); app.EnterText("text_input_mushaf_page_number", "111"); app.Tap("touchable_text_go"); app.Tap("touchable_text_go"); app.WaitForNoElement("touchable_text_go"); //verify that page has been changed app.WaitForElement(x => x.Text("المائدة")); app.ScrollDownTo("touchable_text_page_number_111_footer"); //swipe pages left and right app.SwipeLeftToRight(); app.ScrollDownTo("touchable_text_page_number_112_footer"); //swipe right twice app.SwipeRightToLeft(); app.SwipeRightToLeft(); app.ScrollDownTo("touchable_text_page_number_110_footer"); app.ScrollUpTo("surah_title_text"); //select ayah, verify selection assignment name app.Tap("mushaf_word_15504"); app.WaitForElement(x => x.Marked("mwt_15504_sel")); string assignmentName = "Al-Ma'idah (14) p. 110"; app.Query(x => x.Marked("footer_label_" + assignmentName)); //select end ayah, verify selection assignment name, app.Tap("mushaf_word_15554"); app.WaitForElement("footer_label_Al-Ma'idah (14 to 15) p. 110"); //change selection to one ayah again app.Tap("mushaf_word_15504"); app.WaitForElement(x => x.Marked("mwt_15504_sel")); app.Query(x => x.Marked("footer_label_" + assignmentName)); app.Screenshot("teacher_create_account_flow_assignment_mushaf"); //save assignment, verify assignment name in student card app.Tap("Save"); app.WaitForElement("card_stud_" + studentName + "_assignment_" + assignmentName); app.Tap("card_stud_" + studentName + "_assignment_" + assignmentName); app.Screenshot("teacher_create_account_flow_main_assigment"); app.WaitForElement("card_stud_" + studentName + "_assignment_" + assignmentName); app.Tap("card_stud_" + studentName + "_assignment_" + assignmentName); //edit assignment //save //grade assignment app.Tap("ellipsis"); app.WaitForElement("btn_evaluate_assignment"); app.Tap("btn_evaluate_assignment"); app.WaitForElement("btn_save_eval"); //-- enter word level evaluation ---- //tap on a word to enter some evaluation notes for it //For some reasons there are two instances of the word item, may be a bug that needs to // be investigated later. For now, to get around it, we query how many instances, // and tap on the last time since it would be the active one. Tap("mwt_15504_sel", 1); fillEvalCardNotes("Pay attention to harakat", new string[] { "Muduud" }, true); //--- enter ayah level evaluation -- //tap on end of ayah app.Tap("end_of_ayah_14"); fillEvalCardNotes("ayah needs some more practice", new string[] { "Memorization", "Ekhfae" }, true); //tap on rating app.Tap("rating_view"); app.Tap("btn_expand_notes"); fillEvalCardNotes("overall recitation was fine. Practice some more the ayah.", new string [] { "Memorization", "Ekhfae", "Makharej" }, false); app.Screenshot("teacher_create_account_flow_evaluation"); //save evaluation app.Tap("btn_save_eval"); //verify profile screen: grade, label, history app.ScrollTo("past_assignment_Al-Ma'idah (14) p. 110", "student_profile_container"); app.WaitForElement("past_assignment_" + assignmentName); app.Screenshot("teacher_create_account_flow_student_profile"); app.Tap("past_assignment_" + assignmentName); //wait for old evaluation page to load app.WaitForElement("TopBannerMiddleTitle"); app.WaitForElement(x => x.Marked("mwt_15504_sel")); //attendance }
public void a_Register() { string str = generator.RandomString(10, false); int rand = generator.RandomNumber(5, 100); string randomnumber = rand.ToString(); string email = String.Concat(str, randomnumber); string remain = "@pampers.com"; final_email = String.Concat(email, remain); Thread.Sleep(15000); app.SwipeRightToLeft(); app.SwipeRightToLeft(); app.SwipeRightToLeft(); app.Tap(x => x.Id("joinNowButton")); Thread.Sleep(7000); var isDOB = app.Query("Child's Birth / Due Date").Any(); app.Tap(x => x.Id("firstNameEditText")); app.EnterText("John"); //needs to be changed to the calender element app.ScrollDownTo(x => x.Id("firstNameEditText"), strategy: ScrollStrategy.Auto); Thread.Sleep(3000); if (isDOB == true) { app.Tap("Child's Birth / Due Date"); app.Query(c => c.Class("AlertDialogLayout")); app.Tap("OK"); } app.ScrollDownTo("Email", strategy: ScrollStrategy.Gesture, timeout: new TimeSpan(0, 1, 0)); app.Tap("Email"); app.Tap("Email"); app.EnterText(final_email); var isZIP = app.Query("ZIP Code").Any(); if (isZIP == true) { app.Tap("ZIP Code"); app.EnterText("34265"); } app.ScrollDown("Password"); app.Tap("Password"); app.EnterText("magicA123"); app.ScrollDownTo("I'd love to join!", strategy: ScrollStrategy.Gesture, timeout: new TimeSpan(0, 1, 0)); app.Tap("I'd love to join!"); app.Query(c => c.Marked("OK").Parent().Class("AlertDialogLayout")); if (isDOB == false) { app.WaitForElement(x => x.Id("addDependentButton")); app.Tap(x => x.Id("addDependentButton")); app.Tap("OK"); app.Tap(x => x.Id("onboardingDependentContinueButton")); app.WaitForElement("Let's lock this down"); app.Tap("Let's lock this down"); app.WaitForElement(x => x.Id("phoneNumberEditText")); app.Tap(x => x.Id("phoneNumberEditText")); app.EnterText("+14155552671"); app.Tap(x => x.Id("sendSafetyCodeBtn")); } Thread.Sleep(1000); }
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(); }