public ReportSettingsPage ClickCustomizeTheReportButton() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); Wait.ForRollerOnReportsToGoAway(); this.FiltersButton.Click(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(new ReportSettingsPage()); }
public ReportsPage ReportHasMoreThanOnePage() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); var page = int.Parse(this.CurrentPageLabel.GetText()); Assert.Greater(page, 1); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(new ReportsPage()); }
public void VerifyOrderSavedReports(List <string> savedReports) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); for (var i = 0; i < savedReports.Count; i++) { Assert.AreEqual( savedReports[i], this.SavedReports.GetText(savedReports.Count - i - 1)); } LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); }
public ReportsHeaderPage ChangeTimeViewTo(string timeView) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name, timeView); this.SingleTimeView.Click(); new Button(By.XPath($"//div[contains(text(),'{timeView}')]")).Click(); Wait.ForRollerOnReportsToGoAway(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name, timeView); return(this); }
public ReportsPage ReportDate(string date) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name, date); Wait.ForRollerOnReportsToGoAway(); Assert.AreEqual(date, this.OrganizationUnitAndDate.GetText(1)); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name, date); return(new ReportsPage()); }
public void VerifyLinks() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); Assert.IsTrue(this.Links.GetAttribute("href").Equals("https://my.csintra.net/NASApp/MyPolicies/MyPoliciesServlet?command=File&action=view&docId=599936")); Assert.IsTrue(this.Links.GetAttribute("href", 1).Equals("https://my.csintra.net/NASApp/MyPolicies/MyPoliciesServlet?command=File&action=view&docId=595020")); Assert.IsTrue(this.Links.GetAttribute("href", 2).Equals("https://my.csintra.net/NASApp/MyPolicies/MyPoliciesServlet?command=File&action=view&docId=601239")); Assert.IsTrue(this.Links.GetAttribute("href", 3).Equals("https://my.csintra.net/NASApp/MyPolicies/MyPoliciesServlet?command=File&action=view&docId=461626")); Assert.IsTrue(this.Links.GetAttribute("href", 4).Equals("https://my.csintra.net/NASApp/MyPolicies/MyPoliciesServlet?command=File&action=view&docId=462592")); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); }
public ValueTypesPage VerifySubmitButtonNotAvailableAndErrorMessageAppeared(int valueTypeNumber) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); Assert.AreEqual("true", this.SubmitButton.GetAttribute("disabled")); Assert.IsTrue(new Label(By.XPath($"{ValueTypesLocators.SelectedValueTypes}[{valueTypeNumber + 1}]")) .GetAttribute("class").Contains("applied-values__item-state--invalid")); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(this); }
public ValueTypesPage SelectYtdOrPtdOnValueType(int valueTypeNumber) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); var ytdOrPtd = new Random().Next(0, 2); new Checkbox(By.CssSelector(string.Empty)).CheckByJsForVtYtdPtd((valueTypeNumber * 2) + ytdOrPtd); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(this); }
public ReportsPage ClickWidgetTitle(string widgetTitle) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name, widgetTitle); var widgetTitleButton = new Button(By.XPath($"//div[contains(text(),'{widgetTitle}')]")); widgetTitleButton.ClickByJs(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name, widgetTitle); return(new ReportsPage()); }
internal void OpenThirteenMonths(string thirteenMonthsReportName, string cluster = null) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name, thirteenMonthsReportName, cluster); var reportName = thirteenMonthsReportName.Remove(thirteenMonthsReportName.Length - 4); this.Open(reportName, cluster); this.ClickThirteenMonthsButton(); Wait.ForRollerOnReportsToGoAway(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name, thirteenMonthsReportName, cluster); }
public PovPage ChangeCurrencyTo(string dropdownValue) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name, dropdownValue); this.CurrencyLabel.Click(); this.PovDropdownsLocator = dropdownValue; this.PovDropdowns.Click(); Wait.ForRollersToGoAway(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name, dropdownValue); return(this); }
public MiDashboardPage SetPoV(PoVEntity pov) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); if (!this.ComparePov(pov)) { this.ChangePov(pov); } LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(new MiDashboardPage()); }
public ReportsPage VerifyFooter(ReportsEntity report, bool isNna = false) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); this.CheckLeftFooter(report.LeftFooter(isNna)); // this.CheckCentreFooter(); this.CheckRightFooter(report.RightFooter); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(this); }
public MiDashboardPage OpenAnyReport() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); var report = RandomData.GetReport(); this.SetPoV(report.PoV); this.OpenReport(report.Name); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(new MiDashboardPage()); }
public void IfSelectedVtIsOnTopOfTheList(string expectedVt) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name, expectedVt); this.SingleVtButton.Click(); string selectedVt = this.SingleVtSelectedItem.GetTextByJs(); this.SingleVtButton.Click(); Assert.AreEqual(expectedVt, selectedVt); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name, expectedVt); }
public Report.ReportsPage MyContributionRmScorecard13M() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); this.RmScorecard(); Wait.ForRollerOnReportsToGoAway(); this.reportsPage.ClickThirteenMonthsButton(); Wait.ForRollerOnReportsToGoAway(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(new Report.ReportsPage()); }
public void Open(string reportName) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); this.MySavedReportsMenuButton.ClickByJs(); Wait.ForElement(MiDashboardHeaderLocators.Menu); var report = new Button(By.XPath($@"//div[@class='dashboard-header']//li[contains(text(),'{reportName}')]")); report.ClickByJs(); Wait.ForRollerOnReportsToGoAway(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); }
public ReportsPage KeyFigures13M() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); this.KeyFigures(); Wait.ForRollerOnReportsToGoAway(); this.reportsPage.ClickThirteenMonthsButton(); Wait.ForRollerOnReportsToGoAway(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(new ReportsPage()); }
public ReportsPage OrganizationalBreakdown13M() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); this.OrganizationalBreakdown(); Wait.ForRollerOnReportsToGoAway(); this.reportsPage.ClickThirteenMonthsButton(); Wait.ForRollerOnReportsToGoAway(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(new ReportsPage()); }
public ReportsPage MyClientProfitability13M() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); this.Profitability(); Wait.ForRollerOnReportsToGoAway(); this.reportsPage.ClickThirteenMonthsButton(); Wait.ForRollerOnReportsToGoAway(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(new ReportsPage()); }
public TimePeriodsPage VerifyLayoutForYtdView() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); Assert.IsTrue(this.MonthlyButton.IsVisible()); Assert.IsTrue(this.YtdButton.IsVisible()); Assert.IsTrue(this.ValidateYtdIsSelected()); Assert.IsTrue(this.CancelButton.IsVisible()); Assert.IsTrue(this.SubmitButton.IsVisible()); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(this); }
public void ExpandNextLevel(int numberOfExpandClicks = 1) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name, numberOfExpandClicks); // number of times to click expand next level limited in argument. // Expanding till possible causes out of memory exception in IE after several clicks, marked as exceptional usage of report, story: DVSZBI2-15858 for (var i = 0; i < numberOfExpandClicks && this.ExpandButtonActive(); i++) { this.ExpandNextLevelLink.Click(); Wait.ForRollerOnReportsToGoAway(); } LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name, numberOfExpandClicks); }
public PovPage UnlockPov() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); if (!this.IsUnlocked()) { this.Lock.Click(); Wait.ForRollersOnWidgetsToGoAway(); } LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(this); }
public ValueTypesPage RemoveSelectedRandomValueType() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); var count = this.SelectedValueTypes.Count(); var counter = new Random().Next(1, count); new Button(By.XPath( $"{ValueTypesLocators.SelectedValueTypes}[{counter}]//*[@class='applied-values__button']")).Click(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(this); }
public ValueTypesPage VerifySearchForThreeCharacters() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); var countSearchResults = this.SearchResultCheckboxes.Count(); this.SearchValueTypeInput.EnterValue(RandomData.RandomString(3)); Assert.Greater(countSearchResults, this.SearchResultCheckboxes.Count()); this.SearchValueTypeInput.Clear(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(this); }
public MySavedReportsPage DeleteAllSavedReports() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); this.MySavedReportsMenuButton.ClickByJs(); Wait.ForElement(MiDashboardHeaderLocators.Menu); this.ClickEditButton(); this.SelectAllCheckBox.Click(); this.DeleteSelectedReportsButton.Click(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(this); }
public PovPage ChangeBusinessFunctionTo(string dropdownValue) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name, dropdownValue); this.BusinessFunctionLabel.Click(); this.PovDropdownsLocator = dropdownValue; Wait.ForElement(By.XPath(this.povDropdowns), DriverConsts.TenSecInMilliseconds); this.PovDropdowns.ClickByJs(); Wait.ForRollersToGoAway(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name, dropdownValue); return(this); }
public MiDashboardPage ChangeBusinessGroupTo(string dropdownValue) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name, dropdownValue); this.BusinessGroupLabel.ClickByJs(); Wait.ForRollersToGoAway(); this.PovDropdownsLocator = dropdownValue; this.PovDropdowns.Click(); Wait.ForRollersToGoAway(); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name, dropdownValue); return(new MiDashboardPage()); }
public ReportsPage ReportHeaderLeft(ReportsEntity reportData) { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); this.Title(reportData.Title); Assert.AreEqual(reportData.PoV.OrganizationUnit, this.OrganizationUnitAndDate.GetText()); this.ReportDate(reportData.Date); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(new ReportsPage()); }
public MiDashboardPage WaitForMiDashboardLoaded() { LoggerPage.LogStart(MethodBase.GetCurrentMethod().Name); this.WaitForHomePageLoaded(); this.miDashboardHeaderPage.Reports.WaitForIt(); Wait.Until(d => d.FindElement(MiDashboardHeaderLocators.Reports).GetCssValue("cursor").Equals("pointer")); Assert.IsTrue(this.miDashboardHeaderPage.Reports.IsLinkActive()); Assert.IsTrue(Actions.GetCurrentUrl().Contains(TestContexts.BaseAddress)); LoggerPage.LogEnd(MethodBase.GetCurrentMethod().Name); return(this); }