DevExpress XtraNavBar NavBarControl not a supported control?

Ask general questions here.
User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

DevExpress XtraNavBar NavBarControl not a supported control?

Post by Ciege » Thu Oct 29, 2009 12:17 am

Is the DevExpress XtraNavBar NavBarControl not a supported control?

Currently in my AUT my dev team has implemented a portion of out AUT that utilizes this control. Ranorex can see that the navBarControl exsts but cannot obtain any information from it.

I am using Ranorex version 2.1.4.

Thanks...
Attachments
RanorexSpy.jpg
Screenshot of Ranorex Spy
RanorexSpy.jpg (89.81 KiB) Viewed 5063 times
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: DevExpress XtraNavBar NavBarControl not a supported control?

Post by Support Team » Thu Oct 29, 2009 9:24 am

Works for me with DevExpress 8.1 and 8.3, Ranorex can get all information from it. The elements inside the XtraNavBar.NavBarControl usually have the 'Link' role and are created by the MSAA plugin.

What version of DevExpress do you use?

Regards,
Alex
Ranorex Support Team
Attachments
Spying_XtraNavBar_NavBarControl.png
Ranorex Spy spying an XtraNavBar.NavBarControl from DevExpress version 8.3.4
Spying_XtraNavBar_NavBarControl.png (69.81 KiB) Viewed 5057 times
.
Image

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: DevExpress XtraNavBar NavBarControl not a supported control?

Post by Ciege » Thu Oct 29, 2009 4:11 pm

We are also using v8 of the DevExpress controls.

Once I manually get the groups open (Main, Forms, etc... in my attachment) by manually clicking the drop down button I am able to read all the controls underneath same as you (although we are using a tree control here).

The problem is, I cannot get Ranorex to access the group drop downs buttons to open them. It doesn't see the group headers or the drop down buttons that live on the headers.

So how do I get the group boxes open via the drop button to then be able to get at the bits underneath?

Can you access the group drop down buttons in your example?

Thanks!
Attachments
RanorexSpy.jpg
RanorexSpy.jpg (122.97 KiB) Viewed 5055 times
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: DevExpress XtraNavBar NavBarControl not a supported control?

Post by Ciege » Tue Nov 03, 2009 12:43 am

Hey guys... Any update as to how I can access the NavBar group drop down buttons? Since Ranorex can't see them to open them, I cannot then access the controls that live within the groups.

Thanks...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: DevExpress XtraNavBar NavBarControl not a supported control?

Post by Support Team » Tue Nov 03, 2009 7:21 pm

Hi Ciege,

It took me some time to look into that issue and it seems that Ranorex filters the MSAA elements corresponding to the group boxes. The group boxes do not provide a useful AccessibleRole ("Client"), that's why Ranorex filters them out.

The problem is now that we can't just change our filter algorithm because of backwards compatibility. If we'd show such MSAA elements by default, many RanoreXPaths could change because of the newly not-filtered elements (many of your paths could suddenly not work any more). We could just provide some flag that enables or disables the filtering of such elements for exactly that type of control.

Sounds like some really bad workaround just for the sake of backwards compatibility. Or do you have any better ideas? :-)

Regards,
Alex
Ranorex Support Team
.
Image

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: DevExpress XtraNavBar NavBarControl not a supported control?

Post by Ciege » Tue Nov 03, 2009 7:28 pm

Better ideas? well that could mean a lot of things... Best idea is for you guys to do all my automation coding and let me stay home and collect a paycheck! :-) Short of that...

I've been trying to figure out a way to use InvokeRemotely to do this for me, but I have not figured the correct way to do it. If you could help with designing that functionality that would be most beneficial.

As for showing the filtered MSAA elements. Can we turn that on and off at any given time or is it on or off at execution time of the project? If we can turn it on or off at any time, I could turn it on when searching for the group boxes then turn it off after my search is complete...

Thanks!
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: DevExpress XtraNavBar NavBarControl not a supported control?

Post by Support Team » Wed Nov 04, 2009 6:45 pm

Ciege wrote:As for showing the filtered MSAA elements. Can we turn that on and off at any given time or is it on or off at execution time of the project? If we can turn it on or off at any time, I could turn it on when searching for the group boxes then turn it off after my search is complete...
You can turn the filtering on and off at runtime. And the best thing is: there is already such a flag in the MsaaFlavor class. I.e. the following code line should turn the filtering of MSAA elements off completely, then you should be able to find an element corresponding to the group boxes:
Ranorex.Plugin.MsaaFlavor.Instance.FilterEnabled = false;
The only bad thing about disabling the MSAA filter is that other paths could happen to not work any more. So, be sure to turn filtering on again after you got an instance to the group box elements.

In order to disable filtering in the Ranorex tools, you can use a simple plugin that contains the above code line. I've posted the source code for such a simple plugin in the following post: http://www.ranorex.com/forum/wpf-listvi ... html#p3617
Simply add the above code line at the specified extension point and place the DLL to the specified Plugins folder, then filtering should be disabled in Ranorex Spy.

Regards,
Alex
Ranorex Support Team
.
Image

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: DevExpress XtraNavBar NavBarControl not a supported control?

Post by Ciege » Wed Nov 04, 2009 6:50 pm

Thanks! I'll give this a try later today. I currently have another test running at the moment.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: DevExpress XtraNavBar NavBarControl not a supported control?

Post by Ciege » Wed Nov 04, 2009 10:29 pm

Great! That seems to work fine. I can now find the group boxes. Although the dropdown button is not an object that I can find, I can invoke the accessible default action of the group boxes (which is either expand or collapse) and now get the objects below the group box headers.

Thanks!
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: DevExpress XtraNavBar NavBarControl not a supported control?

Post by Support Team » Thu Nov 05, 2009 9:19 am

Great you could get that to work without the need for a new Ranorex version :-)

Regards,
Alex
Ranorex Support Team
.
Image

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: DevExpress XtraNavBar NavBarControl not a supported control?

Post by Ciege » Thu Nov 05, 2009 7:19 pm

Note to self... Remember, remember, remember to remove the plugin (to enable RanorexSpy to view the group headers) before running the suite of tests (even through Visual Studio). Even though I am turning on/off the filtering in my code when needed, I had to have the plugin installed so I could examine the objects in RanorexSpy.

It took me almost 2 hours to try and figure out why things that have been working for months suddenly broke with my new build of the AUT... :oops:

At least it's almost Friday!
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: DevExpress XtraNavBar NavBarControl not a supported control?

Post by Support Team » Fri Nov 06, 2009 9:23 am

Plugins in the "Plugin" directory are loaded for all Ranorex applications, even for those you create yourself.
Ciege wrote:At least it's almost Friday!
It is already here in Austria :-)

Regards,
Alex
Ranorex Support Team
.
Image