Support for DevExpress

Apr 29, 2008 at 6:09 PM
Hi, I've tried to use White for DevExpress controls, it works fine with some simple hacks, but I've stuck with their GridControl
I've looked through the Table source code and done some tests, It seems that DevExpress grid draw itself manually (probably for performance purposes)
My test looks like

Table table = _mainWindow.Get<Table>("myGrid");
AutomationElementFinder finder = new AutomationElementFinder(table.AutomationElement);
AutomationElementCollection descendants = finder.Descendants(AutomationSearchCondition.All);

descendants contains only 3 elements - Scrollbar and two custom ones, but my grid contains several rows

What do you suggest for such controls? I need at least to get row text collection. Could we retrieve control property values through reflection?
Coordinator
Apr 29, 2008 at 8:37 PM
White currently works only based on UIAutomation. In absence support provided by the DataGrid you are using, I guess you would be stuck.
Reflection would not help you here because white runs the test, out of the process. I havent never tried running white test within the same process. You can give it a shot. (This is something I should try sooner than later.)
You can use keyboard to some extend to manipulate the cells, but even with that I think you would have tough time especially reading the values.
Unfortunately there is no neat solution to this.
Apr 30, 2008 at 10:08 AM
Take a look at http://www.codeplex.com/hawkeye - it allows you to look at and change any property or field in a control
May 30, 2008 at 2:23 PM
If some control does not support UI Automation, it can be extended by supporting some interfaces, read more at msdn.microsoft.com/en-us/library/ms753388
I added simple support for DevExpress grid

P. S. When I compile white project in VS 2008, even with framework 2.0 as a target, white doesn't find controls inside DevExpress Ribbon control, but in VS 2005 everything is ok, It is weird
Coordinator
May 30, 2008 at 8:06 PM
Do you mind sharing code for DevExpress grid support that you built?
I am looking to document this. UIA Client side and server side providers can be written to provide support in these cases. I wonder what did you use.
May 30, 2008 at 8:44 PM
Yea, I've inherited a class from DevExpress Grid and added implementation of UI Automation interfaces to support server side provider, I can share code if needed, but my functionality is not complete, because I needed only basic features like reading the grid contents, There are some code examples in msdn for fragment server providers and simple server providers
Coordinator
Jun 8, 2008 at 2:35 PM
Hey can you send me the code that you mentioned. It would help me get started better.
Thanks
May 27, 2009 at 3:22 PM

@tihobrazov

Can you send me the code, too? I have a problem with devexpress date edit. I want change its value. But i cant. I can found dateedit control as Panel. But panel's name is dateedit value. And i cant change its name.

Thanks a lot.

May 27, 2009 at 4:02 PM

@Yatagan

It is too complex and I skiped doing it :)

May 27, 2009 at 4:23 PM

Thanks... It is too bad. I cant use White... We have so much projects which is use devex... And we tired ui errors...

Jun 1, 2009 at 8:24 AM

@tihobrazov

Can you send me the code. Please? I want try...

Oct 19, 2012 at 5:52 AM

@tihobrazov

 please send me the code piece where you have implemented reading the grid contents.

Oct 19, 2012 at 5:52 AM

@tihobrazov

 please send me the code piece where you have implemented reading the grid contents.