You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on writing a test application with WinAppDriver and Appium for testing WPF Framework controls. While working on this, functionalities provided in the AutomationPeer classes couldn't be tested, since the control is accessed as WindowsElement and the WindowsElement type object couldn't be converted as AutomationPeer classes.
For example, consider we are working on WPF MS DataGrid and the datagrid is accessed through below code functionality.
And we are trying to test some basic automation functionalities on DataGrid with finding row and column counts with converting the WindowsElement as IGridProvider or DataGridAutomationPeer
Using IGridProvider conversion: WindowsElement dataGrid = FrameworkDataGridAppSession.FindElementByAccessibilityId("dataGrid"); IGridProvider dataGridProvider = dataGrid as IGridProvider; int rowCount = dataGridProvider.RowCount; int columnCount = dataGridProvider.ColumnCount;
Using DataGridAutomationPeer conversion: WindowsElement dataGrid = FrameworkDataGridAppSession.FindElementByAccessibilityId("dataGrid"); DataGridAutomationPeer dataGridAutomationPeer = dataGrid as DataGridAutomationPeer; int rowCount = dataGridAutomationPeer.RowCount; int columnCount = dataGridAutomationPeer.ColumnCount;
But the above conversions doesn't work and couldn't get the row and column counts of the grid in automation.
Does anyone has idea on why the conversion doesn't work or please share idea on how to work with MS DataGrid for automation testing with API provided in like IGridProvider, ISelectionProvider etc for DataGridAutomationPeer?
The text was updated successfully, but these errors were encountered:
I am working on writing a test application with WinAppDriver and Appium for testing WPF Framework controls. While working on this, functionalities provided in the AutomationPeer classes couldn't be tested, since the control is accessed as WindowsElement and the WindowsElement type object couldn't be converted as AutomationPeer classes.
For example, consider we are working on WPF MS DataGrid and the datagrid is accessed through below code functionality.
WindowsElement dataGrid = DataGridAppSession.FindElementByAccessibilityId("dataGrid");
And we are trying to test some basic automation functionalities on DataGrid with finding row and column counts with converting the WindowsElement as IGridProvider or DataGridAutomationPeer
Using IGridProvider conversion:
WindowsElement dataGrid = FrameworkDataGridAppSession.FindElementByAccessibilityId("dataGrid");
IGridProvider dataGridProvider = dataGrid as IGridProvider;
int rowCount = dataGridProvider.RowCount;
int columnCount = dataGridProvider.ColumnCount;
Using DataGridAutomationPeer conversion:
WindowsElement dataGrid = FrameworkDataGridAppSession.FindElementByAccessibilityId("dataGrid");
DataGridAutomationPeer dataGridAutomationPeer = dataGrid as DataGridAutomationPeer;
int rowCount = dataGridAutomationPeer.RowCount;
int columnCount = dataGridAutomationPeer.ColumnCount;
But the above conversions doesn't work and couldn't get the row and column counts of the grid in automation.
Does anyone has idea on why the conversion doesn't work or please share idea on how to work with MS DataGrid for automation testing with API provided in like IGridProvider, ISelectionProvider etc for DataGridAutomationPeer?
The text was updated successfully, but these errors were encountered: