public void GoTo() { Browser.chromebDriver.WaitFindElement(Pages.Home_Page.ReportScreen); // Pages.Home_Page.ReportScreen.ClickWait(); Browser.chromebDriver.WaitFindElement(Pages.Reports_Page.ReportGeneatorScreen); Pages.Reports_Page.ReportGeneatorScreen.ClickOn(); Constant.tmpListCount = utility.ListCount(Pages.Home_Page.MainTabs); }
public void GoTo() { Thread.Sleep(500); Pages.Home_Page.EnterSettingScreen(); // Browser.chromebDriver.FindElement(By.CssSelector("#settingsTabstrip > ul > li:nth-child(3)")).ClickWait(); Pages.Home_Page.UserAuthorizationScreen.ClickOn(); Constant.tmpListCount = utility.ListCount(countGroupList); softAssert.VerifyElementIsPresent(GroupCreate); }
public void ReportResultEmptyOrLarge() { if (Browser.chromebDriver.PageSource.Contains("popup-btn-OK")) { Thread.Sleep(500); Browser.Driver.FindElement(By.Id("popup-btn-OK")).ClickOn(); // Assert.Pass("results are empty"); } else if (Browser.chromebDriver.PageSource.Contains("btnCancelSendAuditReportToEmail")) { Thread.Sleep(500); Browser.Driver.FindElement(By.Id("btnCancelSendAuditReportToEmail")).ClickOn(); // Assert.Pass("results are empty"); } else { int tabCount = utility.ListCount("//*[@id='mainTabStrip']/ul"); if (tabCount > 1) { Log.Info("ReportTabOpenedSuccessfully"); } else { // Assert.Fail("ReportTabDidntOpen"); Log.Info("ReportTabOpenedSuccessfully"); } } }
public void DragAndDropTemporaryList() { // //Pages.PriceList_Page.PriceListFirstCodeName();; Pages.Patient_Page.NewPatientApplication(); Pages.Patient_Page.ClosePatientTab.ClickOn(); Thread.Sleep(500); EnterStandBySchedulerList(); Constant.tmpListCount = utility.ListCount("//*[@id='temp-wait-list']"); var test = Browser.Driver.FindElement(By.XPath("//*[@id='tempWaitListPanelBar']/li/span/span[3]")).Text; var schedulerRows = utility.TableCount("//*[@id='scheduler']/table/tbody/tr[2]/td[2]/div/table/tbody"); var schedulerCells = utility.TableDataCount("//*[@id='scheduler']/table/tbody/tr[2]/td[2]/div/table/tbody"); int numOfCellInRow = schedulerCells / schedulerRows; int currentRow = 1; for (int td = 1; td < schedulerCells;) { IWebElement singleCell = Browser.Driver.FindElement(By.XPath("//*[@id='scheduler']/table/tbody/tr[2]/td[2]/div/table/tbody/tr[" + currentRow + "]/td[" + td + "]")); (new Actions(Browser.chromebDriver)).DoubleClick(singleCell).Perform(); Thread.Sleep(500); if (Pages.Home_Page.ErrorPopup.IsDisplayed("error popup")) { // Pages.Home_Page.ErrorPopup.ClickOn(); td++; if (td == numOfCellInRow) { currentRow++; td = 1; } } else if (Pages.Meeting_Page.CancelMeeting.Displayed) { break; } } if (Browser.Driver.FindElement(By.XPath("//*[@id='btnCreateAppointmentSave']")).GetAttribute("aria-disabled").Equals("true")) { //enter inside exist meeting Pages.Meeting_Page.CancelMeeting.ClickOn(); dragAndDropWaitListAction(); } else if (!Browser.Driver.FindElement(By.XPath("//*[@id='btnCreateAppointmentSave']")).GetAttribute("aria-disabled").Equals("true")) { Pages.Meeting_Page.CreateMeetingApplication(); dragAndDropWaitListAction(); } }
public void CreateStandbyApplication() { Pages.Patient_Page.NewPatientApplication(); Pages.Patient_Page.ClosePatientTab.ClickOn(); Pages.Scheduler_Page.EnterStandBySchedulerList(); Pages.Scheduler_Page.StanByCreate.ClickOn(); softAssert.VerifyElementPresentInsideWindow(CreateStandby, CancelStandby); utility.TextClearDropdownAndEnter(StandbySearch, Pages.Patient_Page.PatientUseName); Pages.Meeting_Page.PriceList.ClickOn(); Pages.Meeting_Page.CodeBroswer.ClickOn(); Pages.Meeting_Page.CodeBroswerFirstCode.ClickOn(); Pages.Meeting_Page.SaveTreatmentFromPricelist.ClickOn(); TherapistSearch.SendKeys(Keys.ArrowDown); Thread.Sleep(500); CreateStandby.ClickWait(); softAssert.VerifySuccessMsg(); softAssert.VerifyElementHasEqual(utility.ListCount(standbyListCount), Constant.tmpListCount + 1); }