Example #1
0
 public static void EditUserInUserTable(string userType)
 {
     try
     {
         Ranorex.Cell cellUser = null;
         if (userType.ToLower() == "sqluser")
         {
             cellUser = repo.Application.TableSystemLoginsWhichBelong.FindSingle("//cell[@accessiblevalue='" + Constants.NewSqlUser + "']");
         }
         else
         {
             cellUser = repo.Application.TableSystemLoginsWhichBelong.FindSingle("//cell[@accessiblevalue='" + Constants.NewWindowsUser + "']");
         }
         cellUser.MoveTo();
         //Thread.Sleep(2000);
         cellUser.Click();
         //Thread.Sleep(2000);
         cellUser.DoubleClick();
         Reports.ReportLog("Opened User in Edit mode Successfully ! ", Reports.SQLdmReportLevel.Success, null, Configuration.Config.TestCaseName);
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : EditUserInUserTable : " + ex.Message);
     }
 }
Example #2
0
        //**********************************************************************
        /// <summary>
        /// Move mouse to given items in the comoponet like List, Table and Tree.
        /// </summary>
        public static void MoveTo(LxScriptItem item)
        {
            object       objComponet     = item.getComponent();
            RepoItemInfo objComponetInfo = item.getComponentInfo();
            Type         objType         = objComponet.GetType();

            //MessageBox.Show(objType.Name.ToString());

            if (objType.Name.ToString() == "List")
            {
                RepoItemInfo targetListItemInfo = new RepoItemInfo(objComponetInfo.ParentFolder, "variableListItem",
                                                                   objComponetInfo.Path + "/listitem[@accessiblename='" + item.getArgText() + "']",
                                                                   10000, null, System.Guid.NewGuid().ToString());
                Ranorex.ListItem targetListItem = targetListItemInfo.CreateAdapter <Ranorex.ListItem>(true);
                targetListItem.MoveTo();
            }

            if (objType.Name.ToString() == "Table")
            {
                RepoItemInfo targetCellInfo = new RepoItemInfo(objComponetInfo.ParentFolder, "variableCell",
                                                               objComponetInfo.Path + "/row/cell[@text='" + item.getArgText() + "']",
                                                               10000, null, System.Guid.NewGuid().ToString());
                Ranorex.Cell targetCell = targetCellInfo.CreateAdapter <Ranorex.Cell>(true);
                targetCell.MoveTo();
            }

            if (objType.Name.ToString() == "Tree")
            {
                int    treeLevel    = Convert.ToInt32(item.getArgText());
                string strTreelevel = "";
                for (int i = 1; i <= treeLevel; i++)
                {
                    strTreelevel += "/treeitem";
                }
                RepoItemInfo targetTreeItemInfo = new RepoItemInfo(objComponetInfo.ParentFolder, "variableTreeItem",
                                                                   objComponetInfo.Path + strTreelevel + "[@accessiblename='" + item.getArg2Text() + "']",
                                                                   10000, null, System.Guid.NewGuid().ToString());
                Ranorex.TreeItem targetTreeItem = targetTreeItemInfo.CreateAdapter <Ranorex.TreeItem>(true);
                targetTreeItem.MoveTo();
            }
        }