Exemple #1
0
        public void ThenIShouldBeAbleToContactQAWorksWithTheFollowingInformation(Table table)
        {
            var form = table.CreateInstance <ContactUsForm>();

            NameBox.SendKeys(form.Name);
            EmailBox.SendKeys(form.Email);
            MessageBox.SendKeys(form.Message);
            SendButton.SendKeys(Keys.Return);
            Assert.That(!NameValidation.Displayed, "Form not submitted due to Name validation");
            Assert.That(!EmailValidation.Displayed, "Form not submitted due to invalid Email");
            Assert.That(!EmailBoxValidation.Displayed, "Form not submitted due to Email validation");
            Assert.That(!MessageValidation.Displayed, "Form not submitted due to Messsage validation");
            Assert.That(NameBox.GetAttribute("value") == string.Empty, "Name field should be clear");
            Assert.That(EmailBox.GetAttribute("value") == string.Empty, "Email field should be clear");
            Assert.That(MessageBox.GetAttribute("value") == string.Empty, "Message box should be clear");
        }