Skip to content
Mark Humphreys edited this page Jan 18, 2017 · 21 revisions

Welcome to the ui-automation wiki!

Further examples

Excel

Assuming that the application has already been started, the following code shows how to get data out of cells.

            AutomationWindow window = application.getWindow("Book1 - Excel");
            logger.info(window.name());

            AutomationPanel panel = window.getPanel(10);
            logger.info(panel.name());
            logger.info(panel.getClassName());

            AutomationTab tab = panel.getTab(0);
            logger.info(tab.name());
            AutomationDataGrid grid = tab.getDataGrid(0);
            logger.info(grid.name());

            // 3. Get some data
            AutomationDataGridCell cell = grid.getItem(0,0);
            logger.info(cell.name());
            logger.info(cell.value());
Clone this wiki locally