コード例 #1
0
        public void ValidLogin(IWebDriver driver)
        {
            NavigateTo.LoginFormThroughTheMenu();
            Actions.FillLoginForm((string)Config.Credentials.Valid.Username, (string)Config.Credentials.Valid.Password, Config.Credentials.Valid.RepeatPassword, Driver);

            alert = driver.SwitchTo().Alert();
            Assert.AreEqual(Config.AlertMessages.SuccessfulLogin, alert.Text);

            alert.Accept();
        }
コード例 #2
0
        public void LessThan5Chars()
        {
            NavigateTo.LoginFormScenarioThroughMenu(Driver);
            Actions.FillLoginForm(Config.Credentials.Invalid.Username.FourCharacters, Config.Credentials.Valid.Password, Config.Credentials.Valid.Password, Driver);

            alert = Driver.SwitchTo().Alert();

            Assert.AreEqual(Config.AlertsMessages.UsernameLengthOutOfRange, alert.Text);
            alert.Accept();
        }
コード例 #3
0
        public void ValidLogin()
        {
            NavigateTo.LoginFormScenarioThroughMenu(Driver);
            Actions.FillLoginForm(Config.Credentials.Valid.Username, Config.Credentials.Valid.Password,
                                  Config.Credentials.Valid.RepearPassword, Driver);

            alert = Driver.SwitchTo().Alert();

            Assert.AreEqual(Config.AlertsMessages.SuccessfulLogin, alert.Text);
        }
コード例 #4
0
        public void ValidLogin()
        {
            NavigateTo.LoginFormThroughTheMenu();
            Actions.FillInLoginForm(Config.Credentials.Valid.UserName, Config.Credentials.Valid.Password, Config.Credentials.Valid.RepeatPassword);

            alert = Driver.driver.SwitchTo().Alert();

            Assert.AreEqual(Config.Credentials.AlertMessages.SuccessfulLogin, alert.Text);

            alert.Accept();

            Thread.Sleep(5000);
        }
コード例 #5
0
        public void TestMethod1()
        {
            Driver.driver.Navigate().GoToUrl("http://testing.todvachev.com/");

            NavigateTo.LoginFormThroughTheMenu();

            Thread.Sleep(5000);

            Driver.driver.Navigate().GoToUrl("http://testing.todvachev.com/");

            NavigateTo.LoginFromThroughThePost();
            Thread.Sleep(5000);

            Driver.driver.Quit();
        }
コード例 #6
0
 public void Initialize()
 {
     Driver = Actions.InitDriver();
     NavigateTo.LoginFormScenarioThroughTestCases(Driver);
 }