Пример #1
0
        public void ValidateRegisterOnGrid(string gridTitle, int row, string register)
        {
            string xPath = "";

            try
            {
                if (!String.IsNullOrEmpty(gridTitle))
                {
                    string XPath_p1 = String.Format(xpath_gridByTitle, gridTitle);
                    if (!String.IsNullOrEmpty(register))
                    {
                        if (register.Length > 100)
                        {
                            register = register.Substring(0, 99);
                        }
                        xPath = XPath_p1 + xpath_middle + String.Format(xpath_rowByIndexAndContent, row.ToString(), register);
                    }
                    InfraGrid.CheckGridExistence(xPath);
                }
            }
            catch (Exception e)
            {
                throw new Exception("Not found element: " + xPath, e);
            }
        }
Пример #2
0
        public string GetFirstRowId(string gridTitle)
        {
            string xPath = "";

            try
            {
                xPath = String.Format(xpath_gridByTitle, gridTitle) + xpath_middle + xpath_FirstRowId;
                return(InfraGrid.GetAttributeValue(xPath));
            }
            catch (Exception e)
            {
                throw new Exception("Not found element: " + xPath, e);
            }
        }
Пример #3
0
        public void ValidateGridExistence_ByTitle(string title)
        {
            string xPath = "";

            try
            {
                if (!String.IsNullOrEmpty(title))
                {
                    xPath = String.Format(xpath_gridByTitle, title);
                    InfraGrid.CheckGridExistence(xPath);
                }
            }
            catch (Exception e)
            {
                throw new Exception("Not found element: " + xPath, e);
            }
        }
Пример #4
0
        public void SelectGridItem(string gridTitle, string itemId)
        {
            string xPath = "";

            try
            {
                if (!String.IsNullOrEmpty(gridTitle) && !String.IsNullOrEmpty(itemId))
                {
                    xPath = String.Format(xpath_gridByTitle, gridTitle) +
                            xpath_middle +
                            String.Format(xpath_RowId, itemId);
                }
                InfraGrid.ClickGridItem(xPath);
            }
            catch (Exception e)
            {
                throw new Exception("Not found element: " + xPath, e);
            }
        }