예제 #1
0
        public void CreateValidUser()
        {
            //Arrange
            var createUserPO = new CreateUserPO(_driver);

            //Act
            createUserPO.GoToCreateUserPage();
            createUserPO.FillForm("Selenium Web Driver", "1111111", "*****@*****.**", "9954465564", "Male");
            createUserPO.SubmitForm();

            //Assert
            Assert.Equal("Usuário criado com sucesso", createUserPO.MessageSuccess);
        }
예제 #2
0
        public void ShouldNotCreateInvalidUser(string messageError, params string[] customerValues)
        {
            //Arrange
            var createUserPO = new CreateUserPO(_driver);

            createUserPO.GoToCreateUserPage();

            //Act
            createUserPO.FillForm(customerValues);
            createUserPO.SubmitForm();
            var errorElement = createUserPO.ErrorMessageElement(messageError);

            //Assert
            Assert.NotNull(errorElement);
            Assert.True(errorElement.Displayed);
        }