Exemple #1
0
        public void CreateTherapistUserApplication()
        {
            Pages.UsersManagement_Page.GoTo();

            CreateUser.ClickWait();
            softAssert.VerifyElementPresentInsideWindow(UserCancelBtn, UserCancelBtn);
            UserName.EnterClearText(Constant.userName + RandomNumber.smallNumber());
            UserContinueBtn.ClickOn();
            softAssert.VerifyElementPresentInsideWindow(UserEmailVerification, UserCancelBtn);
            UserLastname.EnterClearText(Constant.userLastName);
            UserEmail.EnterClearText("doctor" + RandomNumber.smallNumber() + "@doctorwin.co.il");
            UserMobile.EnterClearText(Constant.userPhone);
            UserContinueBtn.ClickOn();
            softAssert.VerifyElementPresentInsideWindow(UserGoBack, UserCancelBtn);
            TherapistActiveBtn.ClickOn();
            TherapistDropdownPractice.ClickOn();
            List <IWebElement> practiceList = Browser.Driver.FindElements(By.XPath("//*[@id='PractiseID_listbox']/li")).ToList();
            var lastValue = practiceList[practiceList.Count - 1];

            lastValue.ClickOn();
            UserContinueBtn.ClickOn();
            SelectBusinessOnUserCreate.Click();
            var branchID = BranchIdOnUserCreate.GetAttribute("value");

            Browser.Driver.FindElement(By.CssSelector("#branchID" + branchID + " > label")).ClickOn();
            UserContinueBtn.Click();
            softAssert.VerifyElementPresentInsideWindow(Pages.Home_Page.ErrorPopup, UserCancelBtn);
            SelectDepartmentOnUserCreate.Click();
            UserContinueBtn.Click();
            therapistSchedulerSetup();
            UserContinueBtn.ClickOn();
            softAssert.VerifySuccessMsg();
        }
Exemple #2
0
        //create a create user
        public void CreateUserApplication()
        {
            Pages.UsersManagement_Page.GoTo();
            CreateUser.ClickWait();

            softAssert.VerifyElementPresentInsideWindow(UserCancelBtn, UserCancelBtn);
            UserName.EnterClearText(Constant.userName);
            UserContinueBtn.ClickOn();
            softAssert.VerifyElementPresentInsideWindow(UserEmailVerification, UserCancelBtn);
            UserLastname.EnterClearText(Constant.userLastName);
            UserEmail.EnterClearText(Constant.userEmail);
            UserMobile.EnterClearText(Constant.userPhone);
            UserContinueBtn.ClickOn();
            softAssert.VerifyElementPresentInsideWindow(UserGoBack, UserCancelBtn);
            UserContinueBtn.ClickOn();
            SelectBusinessOnUserCreate.ClickOn();
            var branchID = BranchIdOnUserCreate.GetAttribute("value");

            Browser.Driver.FindElement(By.CssSelector("#branchID" + branchID + " > label")).ClickOn();
            UserContinueBtn.ClickOn();
            softAssert.VerifyElementPresentInsideWindow(Pages.Home_Page.ErrorPopup, UserCancelBtn);
            SelectDepartmentOnUserCreate.ClickOn();
            UserContinueBtn.ClickOn();
            softAssert.VerifySuccessMsg();
        }