public void ClickPanelSection(SidePanelData.Sections section) { this.Driver.Finds(this.sectionLocator).First(s => s.Text.Equals(sectionsNames[section])).Click(); if (section != SidePanelData.Sections.ToolLinking) { int counter = 0; while (this.GetActiveSectionName() != sectionsNames[section] && counter++ < 10) { Thread.Sleep(1000); } if (counter >= 10) { throw new Exception($"Expected section '{section.ToString()}' is not active after selecting"); } } }
public bool IsPageOpened(SidePanelData.Sections section, bool wait = false) { Dictionary <SidePanelData.Sections, Func <bool, bool> > sectionsData = new Dictionary <SidePanelData.Sections, Func <bool, bool> > { { SidePanelData.Sections.Orders, IsOrdersPageOpened }, { SidePanelData.Sections.Tools, IsInventoryPageOpened }, { SidePanelData.Sections.Machines, IsMachinesPageOpened }, { SidePanelData.Sections.ToolLinking, IsLinkPageOpened }, { SidePanelData.Sections.Todo, IsTodoPageOpened }, { SidePanelData.Sections.Settings, IsSettingsPageOpened }, { SidePanelData.Sections.Dashboard, this.IsDashboardPageOpened }, }; return(sectionsData[section].Invoke(wait)); }
public void ClickSideMenuSection(SidePanelData.Sections section) { this.SidePanel.ClickPanelSection(section); }
public void NavigateToSectionInSideMenu(SidePanelData.Sections section) { App.Pages.GeneralPages.AnyPage.ClickSideMenuSection(section); }