public void RegisterWithoutEmailErrorsChange()
        {
            RegistrationPage page = new RegistrationPage(this.driver);
            var user = AccessExcelData.GetUserData(TestContext.CurrentContext.Test.MethodName);

            page.NavigateTo();
            page.FillRegistrationForm(user);
            page.AssertEmailErrorMessage("* Invalid email address");
            page.Email.Clear();
            page.UserName.Click();
            page.AssertEmailErrorMessage("This field is required");
        }
示例#2
0
        public void RegistrateWithoutNameAndInvalidEmail()
        {
            var regPage           = new RegistrationPage(this.driver);
            RegistrationUser user = new RegistrationUser("",
                                                         "",
                                                         new List <bool>(new bool[] { true, false, false }),
                                                         new List <bool>(new bool[] { true, true, true }),
                                                         "Bulgaria",
                                                         "3",
                                                         "3",
                                                         "1978",
                                                         "3597878787878",
                                                         "tanyta",
                                                         "\\e.f.fff @e.w.t",
                                                         @"C:\Users\123\Documents\Rainbow-colored-seahorse.jpg",
                                                         "Family Wars: Question: Popular movie with Schwarzenegger? Answer correct:ROKI",
                                                         "123456789",
                                                         "123456789");


            regPage.NavigateTo();
            regPage.FillRegistrationForm(user);

            regPage.AssertNamesErrorMessage("This field is required");
            regPage.AssertEmailErrorMessage("Invalid email address");
        }
        public void EmailField_NotAllowedCharacters_ErrorMessage()
        {
            RegistrationPage regPage = new RegistrationPage(this.driver);
            RegistrationUser user    = AccessExcelData.GetTestUserData(TestContext.CurrentContext.Test.Name); // Get the current test method name (TestContext.CurrentContext.Test.Name = FirstNameField_Empty_ErrorMessage) and use it as a Key in the xlsx file

            regPage.NavigateTo(regPage.URL);
            regPage.FillRegistrationForm(user);

            regPage.AssertEmailErrorMessage("* Invalid email address");
        }
示例#4
0
        public void RegistrateWithInvalidEmailSigns()
        {
            var regPage = new RegistrationPage(this.driver);
            var RegUser = AccessExcelData.GetTestDataTwo("RegistrateWithInvalidEmailSigns");

            regPage.NavigateTo();
            regPage.FillRegistrationForm(RegUser);

            regPage.AssertEmailErrorMessage("Invalid email address");
        }
示例#5
0
        public void RegistrateWithOutEmail()
        {
            var regPage = new RegistrationPage(this.driver);
            var RegUser = AccessExcelData.GetTestDataTwo("RegistrateWithOutEmail");

            regPage.NavigateTo();
            regPage.FillRegistrationForm(RegUser);

            regPage.AssertEmailErrorMessage("This field is required");
        }
        public void RegistrationWithoutEmailShoulNotBeProcessed()
        {
            //// Arrange
            var registrationPage = new RegistrationPage(this.driver);
            var dataReader       = new DataReader <RegistrationUser>();
            var user             = dataReader.GetData(MethodBase.GetCurrentMethod().Name);

            //// Act
            registrationPage.Open();
            registrationPage.SubmitForm(user);

            //// Assert
            registrationPage.AssertEmailErrorMessage();
        }