Ejemplo n.º 1
0
        /// <summary>
        ///     Select a row from the table
        /// </summary>
        /// <param name="zeroBasedRowIndex">Index of row to be selected</param>
        public void SelectFirstRow(int zeroBasedRowIndex)
        {
            var searchCriteria = SearchCriteria.ByAutomationId(string.Format("Row_{0}", zeroBasedRowIndex));
            var row            = QATableRow.Get(searchCriteria, string.Empty, UIItem, 5000);
            var firstCell      = QAUIItem.Get(SearchCriteria.Indexed(0), string.Empty, row.UIItem, 5000);
            var location       = firstCell.Location;

            location.X -= 2;
            location.Y += 2;
            QAMouse.Click(new Point((int)location.X, (int)location.Y));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     This is to click a row, this will also select the row
        /// </summary>
        /// <param name="zeroBasedIndex"></param>
        private Point GetRowLocationPoint(int zeroBasedIndex)
        {
            var searchCriteria = SearchCriteria.ByAutomationId(string.Format("Row_{0}", zeroBasedIndex));
            var row            = QADataGridRow.Get(searchCriteria, string.Empty, UIItem, 5000);
            var firstCell      = QAUIItem.Get(SearchCriteria.Indexed(0), string.Empty, row.UIItem, 5000);
            var location       = firstCell.Location;

            location.X -= 2;
            location.Y += 2;

            return(location);
        }