Sachini
Sachini

Reputation: 59

How to access datagridview in C# using White framework?

I am new to UI automation testing. Currently I am using TestStack. White framework to access UI elements with UI Spy.

In my testing script, I am trying to access datagridview to select a row and do some operation.

table = _newWindow.Get<TestStack.White.UIItems.TableItems.Table>
  (SearchCriteria.ByAutomationId("dataGridView1"));

But I always get below error, even though my automation id is correct.

"TestStack.White.AutomationException: Failed to get ControlType=table,AutomationId=dataGridView1"

Is this the correct way to search datagridview in a form using White framework?

Using .NET framework 4.5

Upvotes: 1

Views: 815

Answers (0)

Related Questions