TStringGrid

Oct 4, 2012 at 4:32 PM

Hi

I am trying to automate an Delphi application that contains a TStringGrid control.

I need to go item by item and perform an operation if certain value is read.

Out of the box, White does not help me (I find this normal), but can I get some help on this?

Below is the LogStructure() results for the Window that hosts the controls (see the TStringGrid in bold and red font). Sorry for the long post.

AutomationId:
ControlType: ControlType.Window
Name: Details
HelpText:
Bounding rectangle: 323;303;633;417
ClassName: TDetailsForm
IsOffScreen: False
FrameworkId: Win32
ProcessId: 7464

System.Windows.Automation.WindowPattern
System.Windows.Automation.TransformPattern

    AutomationId: 70118
    ControlType: ControlType.Pane
    Name:
    HelpText:
    Bounding rectangle: 823;464;130;253
    ClassName: TPanel
    IsOffScreen: False
    FrameworkId: Win32
    ProcessId: 7464


        AutomationId: 70134
        ControlType: ControlType.Button
        Name: Exit
        HelpText:
        Bounding rectangle: 826;654;124;22
        ClassName: TBitBtn
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464

        System.Windows.Automation.InvokePattern

        AutomationId: 70132
        ControlType: ControlType.Button
        Name: Add
        HelpText:
        Bounding rectangle: 826;633;124;22
        ClassName: TBitBtn
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464

        System.Windows.Automation.InvokePattern

        AutomationId: 70130
        ControlType: ControlType.Button
        Name: Error
        HelpText:
        Bounding rectangle: 826;691;124;22
        ClassName: TBitBtn
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464

        System.Windows.Automation.InvokePattern

        AutomationId: 70128
        ControlType: ControlType.Button
        Name: Yahoo
        HelpText:
        Bounding rectangle: 826;532;124;22
        ClassName: TBitBtn
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464

        System.Windows.Automation.InvokePattern

        AutomationId: 70126
        ControlType: ControlType.Button
        Name: BING
        HelpText:
        Bounding rectangle: 826;511;124;22
        ClassName: TBitBtn
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464

        System.Windows.Automation.InvokePattern

        AutomationId: 70124
        ControlType: ControlType.Button
        Name: Google
        HelpText:
        Bounding rectangle: 826;490;124;22
        ClassName: TBitBtn
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464

        System.Windows.Automation.InvokePattern

        AutomationId: 70122
        ControlType: ControlType.Button
        Name: Print
        HelpText:
        Bounding rectangle: 826;612;124;22
        ClassName: TBitBtn
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464

        System.Windows.Automation.InvokePattern

        AutomationId: 70120
        ControlType: ControlType.Button
        Name: Send
        HelpText:
        Bounding rectangle: 826;591;124;22
        ClassName: TBitBtn
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464

        System.Windows.Automation.InvokePattern

    AutomationId: 70098
    ControlType: ControlType.Pane
    Name:
    HelpText:
    Bounding rectangle: 326;464;497;253
    ClassName: TPanel
    IsOffScreen: False
    FrameworkId: Win32
    ProcessId: 7464


        AutomationId: 70108
        ControlType: ControlType.Pane
        Name:
        HelpText:
        Bounding rectangle: 327;582;495;134
        ClassName: TPanel
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464


            AutomationId: 70116
            ControlType: ControlType.Pane
            Name:
            HelpText:
            Bounding rectangle: 625;606;196;109
            ClassName: TStringGrid
            IsOffScreen: False
            FrameworkId: Win32
            ProcessId: 7464


            AutomationId: 70114
            ControlType: ControlType.List
            Name:
            HelpText:
            Bounding rectangle: 625;606;196;109
            ClassName: TListBox
            IsOffScreen: False
            FrameworkId: Win32
            ProcessId: 7464

            System.Windows.Automation.SelectionPattern

                AutomationId:
                ControlType: ControlType.ListItem
                Name: 0257/259073
                HelpText:
                Bounding rectangle: 627;608;192;13
                ClassName:
                IsOffScreen: False
                FrameworkId: Win32
                ProcessId: 7464

                System.Windows.Automation.SelectionItemPattern

            AutomationId: 70112
            ControlType: ControlType.List
            Name:
            HelpText:
            Bounding rectangle: 328;606;297;109
            ClassName: THListBox
            IsOffScreen: False
            FrameworkId: Win32
            ProcessId: 7464

            System.Windows.Automation.SelectionPattern

                AutomationId:
                ControlType: ControlType.ListItem
                Name: some text
                HelpText:
                Bounding rectangle: 330;608;293;13
                ClassName:
                IsOffScreen: False
                FrameworkId: Win32
                ProcessId: 7464

                System.Windows.Automation.SelectionItemPattern

            AutomationId: 70110
            ControlType: ControlType.Pane
            Name:
            HelpText:
            Bounding rectangle: 328;583;493;23
            ClassName: TPanel
            IsOffScreen: False
            FrameworkId: Win32
            ProcessId: 7464


        AutomationId: 70100
        ControlType: ControlType.Pane
        Name:
        HelpText:
        Bounding rectangle: 327;465;495;117
        ClassName: TPanel
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464


            AutomationId: 70106
            ControlType: ControlType.List
            Name:
            HelpText:
            Bounding rectangle: 624;489;197;92
            ClassName: TListBox
            IsOffScreen: False
            FrameworkId: Win32
            ProcessId: 7464

            System.Windows.Automation.SelectionPattern

                AutomationId:
                ControlType: ControlType.ListItem
                Name: go for it
                HelpText:
                Bounding rectangle: 626;491;193;13
                ClassName:
                IsOffScreen: False
                FrameworkId: Win32
                ProcessId: 7464

                System.Windows.Automation.SelectionItemPattern

            AutomationId: 70104
            ControlType: ControlType.List
            Name:
            HelpText:
            Bounding rectangle: 328;489;296;92
            ClassName: THListBox
            IsOffScreen: False
            FrameworkId: Win32
            ProcessId: 7464

            System.Windows.Automation.SelectionPattern

                AutomationId:
                ControlType: ControlType.ListItem
                Name: show
                HelpText:
                Bounding rectangle: 330;491;292;13
                ClassName:
                IsOffScreen: False
                FrameworkId: Win32
                ProcessId: 7464

                System.Windows.Automation.SelectionItemPattern

            AutomationId: 70102
            ControlType: ControlType.Pane
            Name:
            HelpText:
            Bounding rectangle: 328;466;493;23
            ClassName: TPanel
            IsOffScreen: False
            FrameworkId: Win32
            ProcessId: 7464


    AutomationId: 70090
    ControlType: ControlType.Pane
    Name:
    HelpText:
    Bounding rectangle: 326;325;627;139
    ClassName: TPanel
    IsOffScreen: False
    FrameworkId: Win32
    ProcessId: 7464


        AutomationId: 70094
        ControlType: ControlType.Pane
        Name:
        HelpText:
        Bounding rectangle: 862;326;90;137
        ClassName: TPanel
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464


            AutomationId: 70096
            ControlType: ControlType.Pane
            Name:
            HelpText:
            Bounding rectangle: 862;326;90;47
            ClassName: TPanel
            IsOffScreen: False
            FrameworkId: Win32
            ProcessId: 7464


        AutomationId: 70092
        ControlType: ControlType.Pane
        Name:
        HelpText:
        Bounding rectangle: 327;326;535;137
        ClassName: TStringGrid
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464


    AutomationId: TitleBar
    ControlType: ControlType.TitleBar
    Name: Detalii
    HelpText:
    Bounding rectangle: 326;306;627;19
    ClassName:
    IsOffScreen: False
    FrameworkId: Win32
    ProcessId: 7464


        AutomationId: SystemMenuBar
        ControlType: ControlType.MenuBar
        Name: System Menu Bar
        HelpText:
        Bounding rectangle: 326;306;18;18
        ClassName:
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464


            AutomationId: Item 1
            ControlType: ControlType.MenuItem
            Name: System
            HelpText:
            Bounding rectangle: 326;306;18;18
            ClassName:
            IsOffScreen: False
            FrameworkId: Win32
            ProcessId: 7464

            System.Windows.Automation.ExpandCollapsePattern

        AutomationId: Close
        ControlType: ControlType.Button
        Name: Close
        HelpText:
        Bounding rectangle: 934;305;20;20
        ClassName:
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 7464

        System.Windows.Automation.InvokePattern