Beispiel #1
0
 public static bool ClickThis(this Ranorex.TabPage item)
 {
     System.Threading.Thread.Sleep(sleepTime);
     item.Click();
     System.Threading.Thread.Sleep(sleepTime);
     return(true);
 }
Beispiel #2
0
        public static void CloseTab(string tabName)
        {
            try
            {
                if (repo.QueryAnalyzer.TabInfo.Exists(new Duration(5000)))
                {
                    Ranorex.TabPage tabPage = repo.QueryAnalyzer.Tab;
                    tabPage.RightClick();

                    if (repo.SunAwtWindow.CloseAllTabsInfo.Exists(new Duration(1000)))
                    {
                        repo.SunAwtWindow.CloseAllTabs.ClickThis();
                    }
                    else
                    {
                        repo.SunAwtWindow.CloseTab.ClickThis();
                    }
                    DiscardChanges();
                }
                Sleep();
            }
            catch (Exception ex)
            {
                throw new Exception("CloseTab failed : " + ex.Message);
            }
        }
Beispiel #3
0
 public static void RightClick(this Ranorex.TabPage tab)
 {
     try
     {
         Mouse.Click(tab, System.Windows.Forms.MouseButtons.Right, new Point(40, 10));
         Sleep();
     }
     catch (Exception ex)
     {
         throw new Exception("Tabpage Right Click failed : " + ex.Message);
     }
 }
Beispiel #4
0
 public static void DoubleClickThis(this Ranorex.TabPage item)
 {
     try
     {
         item.DoubleClick();
         Sleep();
     }
     catch (Exception ex)
     {
         throw new Exception("Tabpage Click Failed : " + ex.Message);
     }
 }
        public void WaitForWelcomeScreen(string axPath)
        {
            int  retries = 0;
            bool found   = false;

            while ((!found) && (retries < 10))
            {
                try
                {
                    // Ranorex.Form Popup = axPath;
                    TabPage tab = axPath;
                    found = true;
                }
                catch
                {
                    retries++;
                    if (retries == 10)
                    {
                        throw new Exception("Wellcome screen is not shown");
                    }
                }
            }
        }
Beispiel #6
0
        //wait for
        public void WaitForEditorMode(string axPath)
        {
            int  retries = 0;
            bool found   = false;

            while ((!found) && (retries < 10))
            {
                try
                {
                    // Ranorex.Form Popup = axPath;
                    Ranorex.TabPage tab = axPath;
                    found = true;
                }
                catch
                {
                    retries++;
                    if (retries == 10)
                    {
                        throw new Exception("Editor mode is not shown");
                    }
                }
            }
        }
        public void ClickTab(string tabpath)
        {
            TabPage tab = tabpath;

            tab.Click();
        }