Beispiel #1
0
        public void CanInterpretATeaFileInput()
        {
            string url = "https://www.reddit.com/login/?experiment_d2x_sso_login_link=enabled";
            string tc  = "Test Case: Trying to login to reddit with a random username/password will fail.";
            // string action1 = "click xpath //*[text() = 'Log In']";
            string action1 = "click xpath //*[@id='loginUsername']";
            string action2 = "type id random";
            string action3 = "click id loginPassword";
            string action4 = "type id password";
            string action5 = "click xpath //fieldset[5]/button";

            var tea = new TeaFile(@"./../../../Resources/LoginWithFailingUsername.tea");

            Assert.Equal(url, tea.URL);
            Assert.Equal(tc, tea.TestCase);

            // Assert.Equal(action1, tea.ActionLines[0].ToString());
            Assert.Equal(action1, tea.ActionLines[0].ToString());
            Assert.Equal(action2, tea.ActionLines[1].ToString());
            Assert.Equal(action3, tea.ActionLines[2].ToString());
            Assert.Equal(action4, tea.ActionLines[3].ToString());
            Assert.Equal(action5, tea.ActionLines[4].ToString());
        }
Beispiel #2
0
        public void CanGetAFile()
        {
            var tea = new TeaFile("./../../../Resources/LoginWithFailingUsername.tea");

            Assert.NotNull(tea);
        }