GetItem() публичный Метод

public GetItem ( int row, int column ) : AutomationElement
row int
column int
Результат AutomationElement
Пример #1
0
 private IEnumerable<AutomationElement> GetColumnValuesForRow(GridPattern gridPattern, Int32 rowIndex)
 {
     for (int y = 0; y < gridPattern.Current.ColumnCount; y++)
     {
         var cellElement = gridPattern.GetItem(rowIndex, y);
         yield return TreeWalker.RawViewWalker.GetFirstChild(cellElement);
     }
 }
Пример #2
0
		private void GridPatternTestInternal (GridPattern pattern)
		{
			Assert.AreEqual (3, pattern.Current.ColumnCount, "ColumnCount");
			//Besides the 2 data rows, there is an additional new data row.
			Assert.AreEqual (3, pattern.Current.RowCount, "RowCount");
			var child = pattern.GetItem (0, 1);
			Assert.AreEqual ("Alice", child.Current.Name, "Item [1,1].Name");
			child = pattern.GetItem (1, 0);
			Assert.AreEqual (ControlType.CheckBox, child.Current.ControlType, "Item [0,0].ControlType");
			var toggle = (TogglePattern ) child.GetCurrentPattern (TogglePattern.Pattern);
			Assert.AreEqual (ToggleState.On, toggle.Current.ToggleState, "Item [0,0].ToggleState");
		}