Example #1
0
        public void GivenIEnterTheLoginInformation(Table table)
        {
            var tebleData = table.CreateDynamicSet();

            foreach (var item in tebleData)
            {
                //  for (int i = 0; i < table.RowCount; i++)
                //  {

                SigninPageView signinPageView = new SigninPageView();

                signinPageView.SetuserName(item.UserId);
                signinPageView.SetPassword(item.Password);
                signinPageView.ClickLoginButton();
                Console.WriteLine(item.Password);



                if (FrameworkHelper.IfAlertIsPresent() == true)
                {
                    FrameworkHelper.WebDriver.SwitchTo().Alert().Accept();
                    FrameworkHelper.WebDriver.SwitchTo().DefaultContent();
                }

                else
                {
                    signinPageView.ClickLogout();
                    FrameworkHelper.WebDriver.SwitchTo().Alert().Accept();
                    FrameworkHelper.WebDriver.SwitchTo().DefaultContent();
                }
            }
        }