Exemplo n.º 1
0
        public void PopulateMemWall()
        {
            //using (var browser = new IE("http://qa.eaa.org/apps/airventure/bricks_memorialwall.aspx"))
            using (var browser = new IE("http://www.eaa.org/apps/airventure/bricks_memorialwall.aspx"))
            {
                browser.AutoClose = false;
                MemorialWall mw = new MemorialWall(browser);
                mw.txtDecFirstName = DateTime.Now.ToString("MMddyyyy_hhmmss");
                mw.txtDecLastName = "Last";
                mw.txtDecCity = "Forestville";
                mw.ddlDecState.Options[56].Select();

                mw.birthDate = "1/1/2000";
                mw.deathDate = "1/1/2016";
                mw.txtObituary = "[center]The [b]formatted [/b][i]obituary [/i]will show up [u]here[/u].[/center]";
                mw.NotesComments = "Notes / Comments";

                mw.firstName = "First";
                mw.lastName = "Last";
                mw.city = "Forestville";
                mw.address = "123 Address";
                mw.ddlState.Options[56].Select();
                mw.PhoneNumber = "5551212";
                mw.AreaCode = "920";
                mw.zip = "55555";
                mw.email = "*****@*****.**";
                mw.CreditCard = "4111111111111111";
                mw.CVC = "111";
                mw.ddlCreditCardExpirationMonth.Options[10].Select();
                mw.ddlCreditCardExpirationYear.Options[2].Select();

                mw.BrickInscription01 = "BrickInscription01";
                mw.BrickInscription02 = "BrickInscription01";

                //AlertDialogHandler alertDialogHandler = new AlertDialogHandler();

                //using (new UseDialogOnce(browser.DialogWatcher, alertDialogHandler))
                //{
                //    mw.FileUpload.Set(TestImage);
                //    alertDialogHandler.WaitUntilExists(10 /*seconds*/);

                //    if (!alertDialogHandler.Exists())
                //    {
                //        Assert.Fail("No JavaScript alert when it should have been there");
                //    }

                //    alertDialogHandler.OKButton.Click();
                //}

                mw.SubmitButton.Click();

                string s1 = browser.NativeDocument.Url;
                string s2 = browser.Url;

                browser.WaitForComplete();
            }
        }
Exemplo n.º 2
0
        public void RequiredFields()
        {
            using (var browser = new IE("http://dev.eaa.org/apps/airventure/bricks_memorialwall.aspx"))
            {
                browser.AutoClose = false;
                MemorialWall mw = new MemorialWall(browser);
                mw.SubmitButton.Click();

                Assert.AreEqual(mw.txtDecFirstNameLabel, "This field is required.");
                Assert.AreEqual(mw.txtDecLastNameLabel, "This field is required.");
                Assert.AreEqual(mw.deathDateLabel, "This field is required.");
                Assert.AreEqual(mw.BrickInscription01Label, "This field is required.");
                Assert.AreEqual(mw.firstNameLabel, "This field is required.");
                Assert.AreEqual(mw.lastNameLabel, "This field is required.");
                Assert.AreEqual(mw.addressLabel, "This field is required.");
                Assert.AreEqual(mw.cityLabel, "This field is required.");
                Assert.AreEqual(mw.ddlStateLabel, "This field is required.");
                Assert.AreEqual(mw.zipLabel, "This field is required.");
                Assert.AreEqual(mw.AreaCodeLabel, "This field is required.");
                Assert.AreEqual(mw.PhoneNumberLabel, "This field is required.");
                Assert.AreEqual(mw.emailLabel, "This field is required.");
                Assert.AreEqual(mw.CreditCardLabel, "This field is required.");
                Assert.AreEqual(mw.ddlCreditCardExpirationMonthLabel, "This field is required.");
                Assert.AreEqual(mw.ddlCreditCardExpirationYearLabel, "This field is required.");
                Assert.AreEqual(mw.CVCLabel, "This field is required.");
            }
        }