示例#1
0
        public static void SwitchToViPr()
        {
            List <Window> ViPrWindows = ViPrClass.ViPr.GetWindows();

            foreach (Window ViPrWindow in ViPrWindows)
            {
                if (ViPrWindow.Name.Contains("ViPr - ["))
                {
                    ViPrWindow.Focus(DisplayState.Restored);
                }
            }
            Thread.Sleep(3000);
        }
示例#2
0
        public static void ExitVipr()
        {
            List <Window> ViPers = ViPr.GetWindows();

            foreach (Window ViPrWindow in ViPers)
            {
                if (ViPrWindow.Name.Contains("ViPr - ["))
                {
                    MenuBar menuBar = ViPrWindow.Get <MenuBar>(SearchCriteria.ByText("Application"));
                    Thread.Sleep(1000);
                    menuBar.MenuItem("Exit").Click();
                }
            }

            Thread.Sleep(15000);
            //Thread.Sleep(45000);
            //ViPrClass.CheckViPrLogoffError();
        }