Paste Button on Excel 2007 ribbon

Oct 17, 2011 at 5:33 AM
Edited Oct 17, 2011 at 5:34 AM

Hi All,

I am new to white and exploring v0.2.1 .

I am trying to click on Paste button of excel 2007 ribbon control using white.

it is shown as SplitButton in LogStructure (pasted below).

My Ques is How am I supposed to Access this element?

I have tried accessing it as Button (White.Core.UIItems.Button button = window.Get<White.Core.UIItems.Button>("Paste"); )

and also tried other options under UIItems but none of it worked. And UIItems does not have something like "White.Core.UIItems.SplitButton" through which i can handle this.

Also when i have taken all items under Window.Items, but it doesn't has any splitbuttons in it.

 

LogStructure

====================================================

                                    System.Windows.Automation.ValuePattern

                                        AutomationId:
                                        ControlType: ControlType.Custom
                                        Name: Paste
                                        HelpText:
                                        Bounding rectangle: 16,58,42,66
                                        ClassName:
                                        IsOffScreen: False
                                        FrameworkId:
                                        ProcessId: 556


                                            AutomationId:
                                            ControlType: ControlType.SplitButton
                                            Name: Paste
                                            HelpText:
                                            Bounding rectangle: 16,58,42,38
                                            ClassName:
                                            IsOffScreen: False
                                            FrameworkId:
                                            ProcessId: 556

                                            System.Windows.Automation.InvokePattern
                                            System.Windows.Automation.ValuePattern

                                            AutomationId:
                                            ControlType: ControlType.SplitButton
                                            Name: Paste
                                            HelpText:
                                            Bounding rectangle: 16,96,42,28
                                            ClassName:
                                            IsOffScreen: False
                                            FrameworkId:
                                            ProcessId: 556

                                            System.Windows.Automation.InvokePattern

                                        AutomationId:
                                        ControlType: ControlType.Button
                                        Name: Cut
                                        HelpText:
                                        Bounding rectangle: 58,58,22,22
                                        ClassName:
                                        IsOffScreen: False
                                        FrameworkId:
                                        ProcessId: 556
====================================================

 

 

                                    System.Windows.Automation.ValuePattern

                                        AutomationId:
                                        ControlType: ControlType.Custom
                                        Name: Paste
                                        HelpText:
                                        Bounding rectangle: 16,58,42,66
                                        ClassName:
                                        IsOffScreen: False
                                        FrameworkId:
                                        ProcessId: 556


                                            AutomationId:
                                            ControlType: ControlType.SplitButton
                                            Name: Paste
                                            HelpText:
                                            Bounding rectangle: 16,58,42,38
                                            ClassName:
                                            IsOffScreen: False
                                            FrameworkId:
                                            ProcessId: 556

                                            System.Windows.Automation.InvokePattern
                                            System.Windows.Automation.ValuePattern

                                            AutomationId:
                                            ControlType: ControlType.SplitButton
                                            Name: Paste
                                            HelpText:
                                            Bounding rectangle: 16,96,42,28
                                            ClassName:
                                            IsOffScreen: False
                                            FrameworkId:
                                            ProcessId: 556

                                            System.Windows.Automation.InvokePattern

                                        AutomationId:
                                        ControlType: ControlType.Button
                                        Name: Cut
                                        HelpText:
                                        Bounding rectangle: 58,58,22,22
                                        ClassName:
                                        IsOffScreen: False
                                        FrameworkId:
                                        ProcessId: 556
Oct 17, 2011 at 2:51 PM

Have you tried using the White MenuBar UIItem? The Paste button is contained in a Toolbar control on my excel, and we have had success using MenuBar