This project is read-only.

Datagrid as Panel

Dec 1, 2011 at 4:12 PM

Hello guys,

I have a big Windows Form application out here, which is used by a important Firm, it uses ComponentOne Grids.

I'm trying to make some automatic tests in a revolutionary way, but I'm having some problems.

1) I'm able by using Get<Pane> to get my grid only as a Pane, and has only 3 buttons as child elements


2)UAI Verify, If I try to access manually to this Pane, I cannot find it.

3)UAI Verify, If I try to access to the pane by using the Hover mode(CTRL+Mouse) I can see the pane which has the rows correctly.

What I have to do in order to see those rows? :( :(




Dec 2, 2011 at 12:32 PM


first of all, the best would be the developer of ComponentOne should set correct ControlType for his Grid. (Joke)

if UIA Verify can see the rows, UIAutomation can find them. If White has problems you has to use this way (UIAutomation).


The steps:

get all rows from Pane and try also to get the header element

Generate Header element from automation Element

ListViewHeader header = new ListViewHeader(element, parentControl.ActionListener);

BricksCollection<AutomationElement> coll = new BricksCollection<AutomationElement>(pane.AutomationElement.FindAll( TreeScope.Descendants, new PropertyCondition( AutomationElement.ClassNameProperty, "DataGridRow" )));

BricksCollection since 0.21

ListViewRows rows  = new ListViewRows(coll, parentControl.ActionListener, header);


only an idea , hope that helps




Dec 2, 2011 at 1:34 PM

Thanks you very much for your help, REALLY appreciated!


I excluded the header at the moment, and focused to the Bricks..

unfortunately, I couldn't find any item in the collection :(

I've tried DataGridRow and DataRow ( maybe.. )


this is my code

var dataGrid1 = FormHelper.CurrentWindow.Get<White.Core.UIItems.Panel>("grdData");

 Bricks.RuntimeFramework.BricksCollection<AutomationElement> coll = new BricksCollection<AutomationElement>(dataGrid1.AutomationElement.FindAll(TreeScope.Descendants, new PropertyCondition(AutomationElement.ClassNameProperty, "DataGridRow")));                

coll.count is 0 :(                   

Dec 5, 2011 at 7:56 AM

What does UIAVerify say to the class names of the rows?

it might be a TableRow or Custom (I hope that it is not Custom)

Dec 5, 2011 at 9:15 AM

ControlType = ControlType.Custom :(

ClassName is empty.


It's Custom... argh...

Dec 5, 2011 at 1:16 PM

ComponentOne should fix this :)

can you show all properties of this element here please?

maybe call LogStruture of the pane and post the outcome here

Dec 5, 2011 at 3:16 PM
Edited Dec 5, 2011 at 3:17 PM

I'm posting you UAIVerify 

AND outcome as you asked, after the LogStructure

Dec 5, 2011 at 3:39 PM

the second is what you see in Visual Studio but what I mean is White functionality

to see LogStructure:

insert a line in your code, after getting the panel


this will write all nested UIElements as UIAutomation see them to the output window and/or in the white Log File






Dec 5, 2011 at 3:48 PM

Do I have to configure log4net in order to see the log file? Because I see nothing :(

Dec 5, 2011 at 3:55 PM