示例#1
0
        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");
                }
            }
        }
示例#2
0
        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));
        }
示例#3
0
 public void ClickSideMenuSection(SidePanelData.Sections section)
 {
     this.SidePanel.ClickPanelSection(section);
 }
示例#4
0
 public void NavigateToSectionInSideMenu(SidePanelData.Sections section)
 {
     App.Pages.GeneralPages.AnyPage.ClickSideMenuSection(section);
 }