Example #1
0
        public void Test_TestAddStudentPage_Content()
        {
            var page = new AddStudentPage(driver);

            page.Open();
            Assert.AreEqual("Add Student", page.GetPageTitle());
            Assert.AreEqual("Register New Student", page.GetPageHeadingText());
            Assert.AreEqual("", page.FieldName.Text);
            Assert.AreEqual("", page.FieldEmail.Text);
            Assert.AreEqual("Add", page.ButtonSubmit.Text);
        }
        public void TestAddStudentPage()
        {
            // с ctr+. създава връзка с ViewStudentsPage Class
            var page = new AddStudentPage(driver);

            page.Open();

            Assert.AreEqual("Add Student", page.GetPageTitle());
            Assert.AreEqual("Register New Student", page.GetPageHeadingText());

            // Тестваме дали полетата за name и email са празни
            Assert.IsEmpty(page.NameField.Text);
            Assert.IsEmpty(page.EmailField.Text);
            Assert.AreEqual("Add", page.AddButton.Text);
        }