public void ValidLogin()
        {
            Driver.Navigate().GoToUrl("http://testing.todorvachev.com");

            NavigateTo.LoginFormThroughMenu(Driver);
            Actions.FillLoginForm(Config.Credentials.Valid.Username, Config.Credentials.Valid.Password, Config.Credentials.Valid.RepeatPassword, Driver);

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

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

            alert.Accept();
        }
        public void NavigationBar()
        {
            Driver.driver.Navigate().GoToUrl("http://testing.todorvachev.com");

            NavigateTo.LoginFormThroughMenu();

            Thread.Sleep(500);

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

            NavigateTo.LoginFormThroughThePost();

            Thread.Sleep(5000);

            Driver.driver.Quit();
        }
示例#3
0
        public void ValidLogin()
        {
            NavigateTo.LoginFormThroughMenu();

            Actions.FillLoginForm(Config.Credentials.Valid.Username, Config.Credentials.Valid.Password, Config.Credentials.Valid.RepeatPassword);

            //Implicit Wait
            //Driver.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);

            //Explicit Wait
            //WebDriverWait wait = new WebDriverWait(Driver.driver, TimeSpan.FromMilliseconds(10000));
            //wait.Until(ExpectedConditions.AlertState(false));

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

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

            alert.Accept();
        }
 public void Initialize()
 {
     Actions.InitializeDriver();
     NavigateTo.LoginFormThroughMenu();
 }