Unable to access rows in a DataGridView

Nov 6, 2008 at 10:18 PM
Edited Nov 6, 2008 at 10:20 PM

This has been bugging me for a couple of days and I'm hoping someone can help. I've been unable to access the rows of a DataGridView using either ListView or Table. I may be going about something the wrong way, as I'm very new to White and the UIAutomation process.

The code I'm using to try and access the rows is below.




Table physiciansFoundRows = CreateNewCaseStep3.Get<Table>("dataGridView1");

TableRows rows = physiciansFoundRows.Rows;

On physiciansFoundRows.Rows; the test blows up and I receive the exception "Error invoking Table.get_Rows".

The error text below is all I have with it.

at Bricks.RuntimeFramework.ReflectedObject.Invoke(MethodInfo methodInfo, Object[] arguments) in D:\bricks\Bricks.RuntimeFramework\ReflectedObject.cs:line 69
at Bricks.DynamicProxy.DynamicProxyInterceptors.Process(IInvocation invocation, InterceptContext interceptedContext) in D:\bricks\Bricks\DynamicProxy\DynamicProxyInterceptors.cs:line 20
at Core.Interceptors.CoreInterceptor.Intercept(IInvocation invocation) in d:\white-os\Core\Interceptors\CoreInterceptor.cs:line 29
at Castle.DynamicProxy.AbstractInvocation.Proceed() in d:\OSS\Castle\Tools\Castle.DynamicProxy2\Castle.DynamicProxy\AbstractInvocation.cs:line 165
at TableProxy89c91ede9164497494c69a8b8c9e3cf7.get_Rows()
at LabManagerTestSuite.LMTests.LabManager_Full_Test() in C:\Documents and Settings\mblake\My Documents\Visual Studio 2008\Projects\LabManagerTestSuite\LabManagerTestSuite\LMTests.cs:line 133
at Core.UIItems.UIItem..ctor(AutomationElement automationElement, ActionListener actionListener) in d:\white-os\Core\UIItems\UIItem.cs:line 35
at Core.UIItems.TableItems.TableHeader..ctor(AutomationElement automationElement, ActionListener actionListener) in d:\white-os\Core\UIItems\TableItems\TableHeader.cs:line 13
at Core.Factory.TableHeaderFactory.Create(AutomationElement automationElement, ActionListener actionListener) in d:\white-os\Core\Factory\TableHeaderFactory.cs:line 12
at Core.UIItems.TableItems.Table.get_Header() in d:\white-os\Core\UIItems\TableItems\Table.cs:line 39
at Core.UIItems.TableItems.Table.get_Rows() in d:\white-os\Core\UIItems\TableItems\Table.cs:line 29

The only other information I might be able to provide is that I'm getting a warning in the CLI that Bricks is not configured in Configuration file. I'm not sure if that's relevant or not, but it seems to be the only other information I have to offer.

Please let me know if there's anything else you need, thank you!








Nov 9, 2008 at 12:02 PM
Does your table have a header on it? There is a known issue similar to this: