public void EnterMandatoryFieldsAndSubmit() { TextBoxHelper.EnterText(ForeNameTxtboxId, "Steve"); TextBoxHelper.EnterText(EmailTxtboxId, "*****@*****.**"); TextBoxHelper.EnterText(MessageTxtboxId, "This is testing"); ButtonHelper.ClickButton(SubmitBtnXpath); Assert.IsTrue(GenericHelper.ElementExists(FeedbackConfirmationXpath)); }
public void EnterMandatoryFieldsAndValidateNoError() { TextBoxHelper.EnterText(ForeNameTxtboxId, "Steve"); TextBoxHelper.EnterText(EmailTxtboxId, "*****@*****.**"); TextBoxHelper.EnterText(MessageTxtboxId, "This is testing"); Assert.IsFalse(GenericHelper.ElementExists(ForenameId)); Assert.IsFalse(GenericHelper.ElementExists(EmailId)); Assert.IsFalse(GenericHelper.ElementExists(MessageId)); string ActualHeaderErrorMsg = GenericHelper.GetElementText(HeaderMessageId); Assert.IsFalse(ActualHeaderErrorMsg.Equals(ExpectedHeaderErrorMsg)); }
public void SubmitInvalidDataAndValidateError() { TextBoxHelper.EnterText(ForeNameTxtboxId, "Steve"); TextBoxHelper.EnterText(EmailTxtboxId, "abc"); TextBoxHelper.EnterText(MessageTxtboxId, "This is testing"); string ActualEmailMsg = GenericHelper.GetElementText(EmailId); Assert.IsTrue(ActualEmailMsg.Equals(ExpectedInvalidEmailErrorMsg)); string ActualHeaderErrorMsg = GenericHelper.GetElementText(HeaderMessageId); Assert.IsTrue(ActualHeaderErrorMsg.Equals(ExpectedHeaderErrorMsg)); }