public void ContactUsWithRequiredFieldsEmpty(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(); //Click Confirm button without add information. //The message showing that Name, Telephone, Company should not be empty. ContactUsSetting.ContactUsConfirmButton.Click(); Assert.AreEqual(input.ExpectedData.InvalidMessages[0], ContactUsSetting.GetTextFieldContactUsNameInvalidMsg()); Assert.AreEqual(input.ExpectedData.InvalidMessages[0], ContactUsSetting.GetTextFieldContactUsTelephoneInvalidMsg()); Assert.AreEqual(input.ExpectedData.InvalidMessages[0], ContactUsSetting.GetTextFieldContactUsCompanyInvalidMsg()); //Add information for Name and Click Send button. //The message showing that Telephone, Company should not be empty. TimeManager.ShortPause(); ContactUsSetting.FillInContactUsNameInfo(input.InputData.Name); ContactUsSetting.ContactUsConfirmButton.Click(); Assert.AreEqual(input.ExpectedData.InvalidMessages[0], ContactUsSetting.GetTextFieldContactUsTelephoneInvalidMsg()); Assert.AreEqual(input.ExpectedData.InvalidMessages[0], ContactUsSetting.GetTextFieldContactUsCompanyInvalidMsg()); //Add information for Telephone and Click Send button. //The message showing that Company should not be empty. TimeManager.ShortPause(); ContactUsSetting.FillInContactUsTelephoneInfo(input.InputData.Telephone); ContactUsSetting.ContactUsConfirmButton.Click(); Assert.AreEqual(input.ExpectedData.InvalidMessages[0], ContactUsSetting.GetTextFieldContactUsCompanyInvalidMsg()); //Add information for Company and Click Send button. TimeManager.ShortPause(); ContactUsSetting.FillInContactUsCompanyInfo(input.InputData.Company); ContactUsSetting.ContactUsConfirmButton.Click(); }
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(); }