Skip to content
Mark Humphreys edited this page Jan 29, 2017 · 3 revisions

DataGrid

WFP

  AutomationDataGrid grid = window.getDataGrid(0);
  AutomationDataGridCell cell = grid.getCell(0,0);
  String itemName = item.name();

Delphi

The DelphiUIAutomation project introduced some Delphi controls that implement IUIAutomation providers, allowing them to be accessed by automation. The TAutomatedStringGrid is one of these, as the base Delphi (as of XE5 at least) control does not implement the Grid or Table interfaces and so is opaque to automation. In order to get the element associated with the specific TAutomationStringGrid, then this is done in the following manner.

  AutomationDataGrid grid = window.getDataGrid(0, "TAutomationStringGrid");
  AutomationDataGridCell item = grid.getCell(0,0);
  String itemName = item.name();

This specifically looks controls with a control name of "TAutomationStringGrid", which is the name of the Delphi control introduced in the above project.

Further Examples

Clone this wiki locally