public void VerifyRegisterNowIsClicked()
        {
            LoginPage    regNow    = new LoginPage(driver);
            HomePageTest hmpg_test = new HomePageTest();

            hmpg_test.CheckNavigationToLoginPage();

            regNow.ClickRegisterNow();
            Assert.AreEqual(driver.SwitchTo().Window(driver.WindowHandles[1]).Url, "https://www.epocrates.com/liteRegistration.do?mode=display&ICID=website"); // url is OK
        }
        public void LoginWithInvalidEmail()
        {
            LoginPage    logPg     = new LoginPage(driver);
            HomePageTest hmpg_test = new HomePageTest();

            hmpg_test.CheckNavigationToLoginPage();
            logPg.LoginWithoutSignout("test@120", "System@123");
            String actualMsg = logPg.ReadMessage();

            Assert.AreEqual(actualMsg, "Your email and/or password is incorrect. Please try again.");
        }
        public void VerifyLoginWithAlreadyCreatedUser()
        {
            LoginPage    regNow    = new LoginPage(driver);
            HomePageTest hmpg_test = new HomePageTest();

            hmpg_test.CheckNavigationToLoginPage();

            //string FileName = Environment.CurrentDirectory.ToString() + "\\ConfigFile\\TestDataFile.xlsx";
            ExcelOperations.PopulateInCollection(FileName, "LoginUser");
            //Thread.Sleep(1000);
            regNow.Login(ExcelOperations.ReadData(1, "Email"), ExcelOperations.ReadData(1, "Password"));
        }
        public void CreateUserAndLoginWithThatUser()
        {
            //Boolean correctPage = false;
            LoginPage    regNow    = new LoginPage(driver);
            HomePageTest hmpg_test = new HomePageTest();

            hmpg_test.CheckNavigationToLoginPage();
            regNow.ClickRegisterNow();
            Assert.AreEqual(driver.SwitchTo().Window(driver.WindowHandles[1]).Url, "https://www.epocrates.com/liteRegistration.do?mode=display&ICID=website"); // url is OK
            UserRegistrationPage ur = new UserRegistrationPage(driver);

            Dictionary <string, string> UserData = ur.GetRegisterUserValuesFromExcel();

            ur.RegisterUserExcel(ur.UserData);
            LandingPage lp = new LandingPage(driver);

            lp.MoveToLoginPage();

            regNow.Login(ExcelOperations.ReadData(1, "Email"), ExcelOperations.ReadData(1, "Password"));
        }
        //[Test]
        public void VerifyUserRegistration()
        {
            // LoginPage regNow = new LoginPage(driver);
            HomePageTest hmpg_test = new HomePageTest();

            hmpg_test.CheckNavigationToLoginPage();

            LandingPage lp = new LandingPage(driver);

            //regNow.ClickRegisterNow();
            //Console.WriteLine("Landing Page url post ckicking RegisterNow is : " + driver.Url);
            //url shud be : https://www.epocrates.com/liteRegistration.do?mode=display&ICID=website
            driver.Navigate().GoToUrl("https://www.epocrates.com/liteRegistration.do?mode=display&ICID=website");
            UserRegistrationPage userReg = new UserRegistrationPage(driver);

            userReg.RegisterUser();
            Console.WriteLine("Landing Page url is : " + driver.CurrentWindowHandle);

            Assert.IsTrue(lp.BtnContinue.Displayed);
        }