Example #1
0
        public static void QueryAnalyserTab()
        {
            try
            {
                Escape();
                Keyboard.Press(Keyboard.ToKey("Ctrl+Q"), Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true);
                Sleep();

                // Additional Check to handle server connection failures
                if (repo.Connection.RetryButtonInfo.Exists(5000))
                {
                    repo.Connection.CloseButton.ClickThis();
                    isPreconditionDone = false;
                    SelectedServerTreeItem.Select();
                    DisconnectServer();
                    throw new Exception("ConnectServer failed : Server Connection failed for the server : " + SelectedServerName);
                }

                repo.QueryAnalyzer.TabInfo.WaitForItemExists(10000);
            }
            catch (Exception ex)
            {
                throw new Exception("QueryAnalyser failed : " + ex.Message);
            }
        }
Example #2
0
        public static void ConnectServer()
        {
            try
            {
                Keyboard.Press(Keyboard.ToKey("Ctrl+Insert"), Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true);
                System.Threading.Thread.Sleep(10000);

                // Server Status Check
                if (SelectedServerName != "MSExcel" && SelectedServerTreeItem.Items.Count <= 1)
                {
                    isPreconditionDone = false;
                    SelectedServerTreeItem.Select();
                    SelectedServerTreeItem.RightClickThis();
                    DisconnectServer();
                    throw new Exception("ConnectServer failed : Server Connection failed for the server : " + SelectedServerName);
                }
            }
            catch (Exception ex)
            {
                throw new Exception("ConnectServer failed : " + ex.Message);
            }
        }