Hey Guys,
After being very happy with your Framework for my studies, I decided to show it to my fellow workers and my boss at work. They gave me two days to generate some of the tests we need for our project, in order to decide if to purchase the TS solution or stay with Microsoft's standard Framework.
So far, I am making good progress, but there is one problem I am not able to solve.
In General
I have got a grid view with some comboboxes inside. The comboboxes are not explicitly created by Xaml code, but instead are generated automatically by some Framework behind by providing the Framework with a table and the names of the ID and display columns.
The Good side
TS does not give a WindowsME about that... It finds the Element, and can select items.
The Problem
TS displays the following expression in the rep:
XamlTag=datagridcontrol,name=dgrMelder,|,XamlPath=/grid[0]/border[0]/adornerdecorator[name=PART_DragDropAdornerDecorator]/tableviewscrollviewer[name=PART_ScrollViewer]/grid[0]/grid[0]/synchronizedscrollviewer[name=fixedFooterScrollViewer]/grid[0]/scrollcontentpresenter[0]/tableviewheaderfooterpanel[0]/headerfooteritem[0]/gridtoolbarinsertionrowsteuermatrix[0]/border[0]/contentpresenter[0]/stackpanel[0]/insertionrow[0]/grid[name=rootGrid]/fixedcellpanel[name=PART_CellsHost]/scrollingcellsdecorator[0]/virtualizingfixedcellsubpanel[0]/insertioncell[1]/grid[0]/border[name=rootBorder]/grid[0]/cellcontentpresenter[name=PART_CellContentPresenter]/grid[0]/innercellcontentpresenter[1]/comboboxex[0]
When I try to find the Element via FindByExpression it fails.
I tried:
FrameworkElement cmbb = WpfApplication.MainWindow.Find.ByExpression(
new
XamlFindExpression(
"XamlTag=datagridcontrol,name=dgrMelder,|,XamlPath=/grid[0]/border[0]/adornerdecorator[name=PART_DragDropAdornerDecorator]/tableviewscrollviewer[name=PART_ScrollViewer]/grid[0]/grid[0]/synchronizedscrollviewer[name=fixedFooterScrollViewer]/grid[0]/scrollcontentpresenter[0]/tableviewheaderfooterpanel[0]/headerfooteritem[0]/gridtoolbarinsertionrowsteuermatrix[0]/border[0]/contentpresenter[0]/stackpanel[0]/insertionrow[0]/grid[name=rootGrid]/fixedcellpanel[name=PART_CellsHost]/scrollingcellsdecorator[0]/virtualizingfixedcellsubpanel[0]/insertioncell[1]/grid[0]/border[name=rootBorder]/grid[0]/cellcontentpresenter[name=PART_CellContentPresenter]/grid[0]/innercellcontentpresenter[1]/comboboxex[0]"
)).As<ComboBox>();
AND
FrameworkElement dgrMelder = WpfApplication.MainWindow.Find.ByName<DataGrid>(
"dgrMelder"
);
FrameworkElement cmbb = WpfApplication.MainWindow.Find.ByExpression(dgrMelder,
new
XamlFindExpression(
"xamlpath=/grid[0]/border[0]/adornerdecorator[name=PART_DragDropAdornerDecorator]/tableviewscrollviewer[name=PART_ScrollViewer]/grid[0]/grid[0]/synchronizedscrollviewer[name=fixedFooterScrollViewer]/grid[0]/scrollcontentpresenter[0]/tableviewheaderfooterpanel[0]/headerfooteritem[0]/gridtoolbarinsertionrowsteuermatrix[0]/border[0]/contentpresenter[0]/stackpanel[0]/insertionrow[0]/grid[name=rootGrid]/fixedcellpanel[name=PART_CellsHost]/scrollingcellsdecorator[0]/virtualizingfixedcellsubpanel[0]/insertioncell[1]/grid[0]/border[name=rootBorder]/grid[0]/cellcontentpresenter[name=PART_CellContentPresenter]/grid[0]/innercellcontentpresenter[1]/comboboxex[0]"
));
I also tried to use verbatim stringsm just for the case. But it didn't change anything.
Can you help me?
Stephan