Esempio n. 1
0
        public void ContactUsValid(ContactUsData input)
        {
            //Open the homepage via click the hyperlink send for created demo user.
            JazzFunction.LoginPage.LoginCutomerOption(input.InputData.Customer);
            TimeManager.Pause(20000);

            //Go to verify Contact Us.
            Assert.IsTrue(ContactUsSetting.ContactUsButtonIsVisiable());

            //Click Contact Us.
            ContactUsSetting.ContactUsButton.Click();
            TimeManager.MediumPause();

            //Input valid info in Name, Telephone, Company, Title and Description fields.
            ContactUsSetting.FillInContactUsNameInfo(input.InputData.Name);
            ContactUsSetting.FillInContactUsTelephoneInfo(input.InputData.Telephone);
            ContactUsSetting.FillInContactUsCompanyInfo(input.InputData.Company);
            ContactUsSetting.FillInContactUsTitleInfo(input.InputData.Title);
            ContactUsSetting.FillInContactUsDescriptionFieldsInfo(input.InputData.DescriptionFields);
            TimeManager.ShortPause();

            // click Confirm button.
            ContactUsSetting.ContactUsConfirmButton.Click();
        }
Esempio n. 2
0
        public void ContactUsWithInvalid(ContactUsData input)
        {
            //Open the homepage via click the hyperlink send for created demo user.
            JazzFunction.LoginPage.LoginCutomerOption(input.InputData.Customer);
            TimeManager.LongPause();

            //Click Contact Us.
            ContactUsSetting.ContactUsButton.Click();
            TimeManager.ShortPause();

            //There are five groups of illegal data
            int InvalidNumber = 5;

            for (int i = 0; i < InvalidNumber; i++)
            {
                //Add invalid information for Name and Click Send button.
                //The message showing that Name is invalid.
                ContactUsSetting.FillInContactUsNameInfo(input.InputData.Names[i]);
                TimeManager.ShortPause();
                ContactUsSetting.ContactUsConfirmButton.Click();
                Assert.AreEqual(input.ExpectedData.Name, ContactUsSetting.getContactUsInvalidNameMessage());
                TimeManager.ShortPause();

                //Add invalid information for Telephone and Click Send button.
                //The message showing that Telephone is invalid.
                ContactUsSetting.FillInContactUsTelephoneInfo(input.InputData.Telephones[i]);
                TimeManager.ShortPause();
                ContactUsSetting.ContactUsConfirmButton.Click();
                // Assert.IsTrue(ContactUsSetting.IsTextFieldContactUsTelephoneDisplayed());
                Assert.AreEqual(input.ExpectedData.Telephone, ContactUsSetting.getContactUsInvalidTelephoneMessage());

                //Add invalid information for Company and Click Send button.
                //The message showing that Company is invalid.
                ContactUsSetting.FillInContactUsCompanyInfo(input.InputData.Companys[i]);
                TimeManager.ShortPause();
                ContactUsSetting.ContactUsConfirmButton.Click();
                Assert.AreEqual(input.ExpectedData.Company, ContactUsSetting.getContactUsInvalidCompanyMessage());

                //Add invalid information for Title and Click Send button.
                //The message showing that Title is invalid.
                ContactUsSetting.FillInContactUsTitleInfo(input.InputData.Titles[i]);
                TimeManager.ShortPause();
                ContactUsSetting.ContactUsConfirmButton.Click();
                Assert.AreEqual(input.ExpectedData.Title, ContactUsSetting.getContactUsInvalidTitleMessage());

                //Add invalid information for Description fields and Click Send button.
                //The message showing that Description fields is invalid.
                ContactUsSetting.FillInContactUsDescriptionFieldsInfo(input.InputData.DescriptionFieldss[i]);
                TimeManager.ShortPause();
                ContactUsSetting.ContactUsConfirmButton.Click();
                Assert.AreEqual(input.ExpectedData.DescriptionFields, ContactUsSetting.getContactUsInvalidDescriptionFieldsMessage());
            }

            //Add valid information for Name, Telephone, Company, Title and Description fields. And then click Send button.
            ContactUsSetting.FillInContactUsNameInfo(input.InputData.Names[5]);
            TimeManager.ShortPause();
            ContactUsSetting.FillInContactUsTelephoneInfo(input.InputData.Telephones[5]);
            TimeManager.ShortPause();
            ContactUsSetting.FillInContactUsCompanyInfo(input.InputData.Companys[5]);
            TimeManager.ShortPause();
            ContactUsSetting.FillInContactUsTitleInfo(input.InputData.Titles[5]);
            TimeManager.ShortPause();
            ContactUsSetting.FillInContactUsDescriptionFieldsInfo(input.InputData.DescriptionFieldss[5]);
            TimeManager.ShortPause();

            // click Confirm button.
            ContactUsSetting.ContactUsConfirmButton.Click();
        }