Exemple #1
0
 public void UserRequestsToBorrowItemAfterViewingLendersProfile()
 {
     app.Tap(x => x.Marked("Sign-in"));
     app.WaitForElement("Tapped on view with class: UIButton marked: Sign-in");
     app.WaitForElement("Tapped on view with class: UIWebView");
     app.EnterText(x => x.Class("UIWebView").Css("INPUT._56bg._4u9z._5ruq"), "*****@*****.**");
     app.WaitForElement("Tapped on view with class: UIWebView");
     app.EnterText(x => x.Class("UIWebView").Css("INPUT#u_0_2"), "Imperial09!");
     app.WaitForElement("Tapped on view with class: UIWebView");
     app.Tap(x => x.Marked("Liverpool"));
     app.WaitForElement("Tapped on view with class: UILabel marked: Liverpool");
     app.Tap(x => x.Text("View Profile"));
     app.WaitForElement("Tapped on view with class: UIButtonLabel marked: View Profile");
     app.Tap(x => x.Text("Reviews"));
     app.WaitForElement("Tapped on view with class: UIButtonLabel marked: Reviews");
     app.Tap(x => x.Text("Back"));
     app.WaitForElement("Tapped on view with class: UIButtonLabel marked: Back");
     app.Tap(x => x.Text("Back"));
     app.WaitForElement("Tapped on view with class: UIButtonLabel marked: Back");
     app.ScrollDownTo("Borrow Item");
     app.WaitForElement("Scrolled to [AppView: Class=[Class: Name=UIButtonLabel], Id=, Text=Borrow Item, Marked=Borrow Item, Css=, XPath=, IndexInTree=-1, Rect=[Rectangle: Left=118.5, Top=527, CenterX=160, CenterY=536, Width=83, Height=18, Bottom=545, Right=201.5]]");
     app.Tap(x => x.Text("Borrow Item"));
     app.WaitForElement("Tapped on view with class: UIButtonLabel marked: Borrow Item");
     app.Tap(x => x.Text("Send borrow request"));
     app.WaitForElement("Tapped on view with class: UIButtonLabel marked: Send borrow request");
     app.Tap(x => x.Marked("Okay"));
     app.WaitForElement("Tapped on view with class: _UIAlertControllerActionView marked: Okay");
 }
Exemple #2
0
 public void UpdateFirstName()
 {
     app.Screenshot("App Started");
     app.Tap(x => x.Id("setupDataPartitionPhraseField"));
     app.EnterText("UseLocalDataSource");
     app.Screenshot("Entered data parition phrase");
     app.Tap(x => x.Id("setupContinueButton"));
     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"));
     Thread.Sleep(3000);             // wait 3 seconds to give map time to fully render
     app.Screenshot("Detail screen");
     app.Tap(x => x.Id("acquaintanceEditButton"));
     app.Screenshot("Edit screen");
     app.ScrollDownTo("First");
     app.Tap(x => x.Id("firstNameField"));
     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("acquaintanceSaveButton"));
     Thread.Sleep(3000);             // wait 3 seconds to give map time to fully render
     app.Screenshot("Saved changes, navigated to detail screen, first name updated");
     app.Tap(x => x.Marked("Navigate up"));
     app.Screenshot("First name updated on list screen");
 }
Exemple #3
0
        private void logOut()
        {
            //Test logging out
            app.Tap("TopBannerLeftButton");
            app.WaitForElement("QuranConnect");

            app.ScrollDownTo("QcDrawerItem_Settings");
            app.WaitForElement("QcDrawerItem_Settings");
            app.Tap("QcDrawerItem_Settings");
            app.WaitForElement("Log Out");
            app.Tap("Log Out");

            //verify that we are back on the login screen
            app.WaitForElement("LOGIN");
        }
        public void ResetPWD_LogedIn()
        {
            app.Tap(x => x.Id("cc_forgot_password"));
            app.Screenshot("Tapped on view with class: AppCompatTextView with id: cc_forgot_password with text: Passwort vergessen?");
            app.Tap(x => x.Id("rp_email"));
            app.Screenshot("Tapped on view with class: EditTextValidating with id: rp_email");
            app.EnterText(x => x.Id("rp_email"), "*****@*****.**");
            app.DismissKeyboard();
            app.Tap(x => x.Id("rp_new_password"));
            app.Screenshot("Tapped on view with class: EditTextValidating with id: rp_new_password");
            app.EnterText(x => x.Id("rp_new_password"), "qwer1234");
            app.DismissKeyboard();
            app.ScrollDownTo("rp_button");
            app.Screenshot("Scrolled to Class: '[Class: Name=android.support.v7.widget.AppCompatButton]'; Id: 'rp_button'; Text: 'Passwort ändern'; ");
            app.Tap(x => x.Id("rp_button"));
            app.Screenshot("Tapped on view with class: AppCompatButton with id: rp_button with text: Passwort ändern");
            app.Tap(x => x.Id("rp_pin"));
            app.EnterText(x => x.Id("rp_pin"), "0");
            app.EnterText(x => x.Id("rp_pin"), "1");
            app.EnterText(x => x.Id("rp_pin"), "3");
            app.EnterText(x => x.Id("rp_pin"), "3");
            app.EnterText(x => x.Id("rp_pin"), "7");
            app.EnterText(x => x.Id("rp_pin"), "0");
            app.DismissKeyboard();
            app.Tap(x => x.Id("rp_activate"));
            app.Screenshot("Tapped on view with class: AppCompatButton with id: rp_activate with text: Neues Passwort aktivieren");
            app.Tap(x => x.Id("tint_toolbar_title"));
            app.Screenshot("Tapped on view with class: AppCompatTextView with id: tint_toolbar_title with text: Fahrt beginnen");
            var headerExists = app.Query("tint_toolbar_title").Any();

            Assert.IsTrue(headerExists);
        }
        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 DeveClicarNoUltimoElementoDaLista()
        {
            var ultimoElementoDaLista = "#user-8";

            NavegarParaTelaChats();

            app.ScrollDownTo(x => x.WebView().Css(ultimoElementoDaLista), strategy: ScrollStrategy.Gesture, timeout: new TimeSpan(0, 0, 30));
            app.Tap(x => x.WebView().Css(ultimoElementoDaLista));

            var title = app.WaitForElement(x => x.WebView().Css(".title.title-left.header-item")).FirstOrDefault().TextContent;

            title.Should().Be("Wennder dos Santos");
        }
Exemple #7
0
        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();
        }
Exemple #8
0
        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")));
        }
Exemple #9
0
        private FileInfo TakeScreenshotOfExample(string exampleName)
        {
            // need to ensure that we take screenshot with same orientation
            _app.SetOrientationPortrait();

            _app.WaitForElement(c => c.Marked("examplesList"));

            _app.ScrollDownTo(c => c.Text(exampleName));

            _app.Screenshot(exampleName);

            _app.Tap(c => c.Text(exampleName));

            _app.WaitForElement(c => c.Marked("fragment_container"));

            _app.Invoke("InitExampleForUiTest");

            return(_app.Screenshot(exampleName));
        }
Exemple #10
0
 public void UpdateFirstName()
 {
     app.WaitForElement(x => x.Marked("Armstead, Evan"), "timed out waiting for list to load", new TimeSpan(0, 0, 10));                // 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.Text("Green, Monica"));
     app.WaitForElement(x => x.Marked("Zoom out")); // 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.Marked("Edit"));
     app.Screenshot("Edit screen");
     app.ScrollDownTo("First");
     app.Tap(x => x.Text("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.Marked("Save"));
     app.WaitForElement(x => x.Marked("Zoom out")); // 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.Class("ImageButton"));
     app.ScrollDownTo("Green, Erica");
     app.Screenshot("First name updated on list screen, first name updated");
 }
Exemple #11
0
 public void UpdateFirstName()
 {
     app.Screenshot("App Started");
     app.EnterText(x => x.Class("EntryEditText"), "UseLocalDataSource");
     app.Screenshot("Entered data parition phrase");
     app.Tap(x => x.Text("Continue"));
     Thread.Sleep(10000);             // wait 10 seconds to let list and all images load
     app.Screenshot("Display list");
     app.ScrollDownTo("Green, Monica", swipePercentage: 0.5, swipeSpeed: 200);
     app.Screenshot("Scrolled to Monica Green");
     app.Tap(x => x.Text("Green, Monica"));
     Thread.Sleep(3000);             // wait 3 seconds to give map time to fully render
     app.Screenshot("Detail screen");
     app.Tap(x => x.Marked("Edit"));
     app.Screenshot("Edit screen");
     app.ScrollDownTo("First");
     app.Tap(x => x.Text("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.Marked("Save"));
     Thread.Sleep(3000);             // wait 3 seconds to give map time to fully render
     app.Screenshot("Saved changes, navigated to detail screen, first name updated");
     app.Tap(x => x.Class("ImageButton"));
     app.ScrollDownTo("Green, Erica");
     app.Screenshot("First name updated on list screen, first name updated");
 }
Exemple #12
0
        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);
        }
Exemple #13
0
 public void UpdateFirstName()
 {
     app.WaitForElement(x => x.Id("nameTextView"));             // wait for the list to appear
     app.Screenshot("App start, display list");
     app.ScrollDownTo("Green, Monica", withinMarked: "acquaintanceRecyclerView");
     app.Screenshot("Scrolled to Monica Green");
     app.Tap(x => x.Marked("Green, Monica"));
     Thread.Sleep(2000);             // wait 2 seconds to give map time to fully render
     app.Screenshot("Detail screen");
     app.Tap(x => x.Id("acquaintanceEditButton"));
     app.Screenshot("Edit screen");
     app.ScrollDownTo("First");
     app.Tap(x => x.Id("firstNameField"));
     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("acquaintanceSaveButton"));
     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("Navigate up"));
     app.ScrollDownTo("Green, Erica");
     app.Screenshot("First name updated on list screen, first name updated");
 }
Exemple #14
0
        string RegisterUser(int random, Model model, string followUserName = null)
        {
            app.Tap(model.RegisterButton);

            app.WaitForElement(model.RegisterName);

            var email = "Artist" + random + "@email.com";

            app.Tap(model.RegisterEmail);
            app.EnterText(email);

            app.Tap(model.RegisterName);
            app.EnterText(getArtistName(random));

            app.Tap(model.RegisterPassword);
            app.EnterText("123456");

            app.Tap(model.RegisterPasswordConfirmation);
            app.EnterText("123456");

            app.PressEnter();

            app.Tap(model.RegisterRegisterButton);

            app.WaitForElement(model.PhoneVerificationNumberOne);

            app.Tap(model.PhoneVerificationNumberOne);
            app.EnterText("011");

            var fourDigit = String.Format("{0:0000}", random % 10000);

            app.Tap(model.PhoneVerificationNumberTwo);
            app.EnterText("1111");

            app.Tap(model.PhoneVerificationNumberThree);
            app.EnterText(fourDigit);

            app.PressEnter();

            app.Tap(model.PhoneVerificationButton);

            app.WaitForElement(model.PhoneNumberConfirmationSend);

            app.Tap(model.PhoneNumberConfirmationSend);

//			app.WaitForElement(model.ToastMessage);

//			var code = app.Query(model.ToastMessage).First().Text;

//			Console.Out.WriteLine(code);

//			code = code.Replace("Code: ", "");

            app.Tap(model.PhoneVerificationCodeNumber);

            // app.EnterText(code);
            app.EnterText("0000");

            app.Tap(model.PhoneVerificationCodeButton);

            app.Tap(model.PhoneNumberConfirmationSend);

            if (followUserName == null)
            {
                app.Tap(model.FirstFollowArtistButton);
            }
            else
            {
                app.ScrollDownTo(model.FollowArtistButton(followUserName));
                app.Tap(model.FollowArtistButton(followUserName));
            }

            app.Tap(model.FollowDoneButton);

            app.Tap(model.SideMenuHamburger);

            app.Tap(model.SideMenuSetting);

            app.ScrollToVerticalEnd();

            app.Tap(model.SettingsLogout);

            return(email);
        }