Tab Index of controls

Class library usage, coding and language questions.
JSH_QA
Posts: 56
Joined: Thu Apr 05, 2012 9:03 am

Tab Index of controls

Post by JSH_QA » Tue Oct 21, 2014 2:49 pm

When working with browser-based apps, I can check that controls on an HTML page have their tab index set using a method such as:

ATag aTag = /* populate aTag here */
String tabIndex = aTag.Tabindex;
/* check the value of tabIndex here */

What is the recommended way in coded Ranorex tests of checking the tab index of a control on a typical Windows .Net page (e.g. an application built using WPF?)?

Similarly, how would this be done in coded Ranorex tests for controls on native Windows applications?

A method of confirming that these controls are on the tab sequence is easy enough (if nasty), but is there a method in the Ranorex APIs of getting the actual tab index of an arbitrary control (given it's adapter)?

Many thanks,

John H.

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

Re: Tab Index of controls

Post by Support Team » Thu Oct 23, 2014 1:14 pm

Hello John,

For the WPF TabControl you could use following line of code in order to retrieve the index of its items.
//WPF
TabPage tabItem = "YourPath";
var index = tabItem.Index;
Regards,
Robert
.
Image

JSH_QA
Posts: 56
Joined: Thu Apr 05, 2012 9:03 am

Re: Tab Index of controls

Post by JSH_QA » Thu Oct 23, 2014 1:20 pm

Thanks Robert

Do you know if adding this is on the roadmap for Ranorex, and if so, on what timescale?

Thanks,

John H.

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

Re: Tab Index of controls

Post by Support Team » Mon Oct 27, 2014 11:12 am

Hello John,

Unfortunately, I mixed up something here. It should be possible to recognize ‚TabPages‘ within Win32 applications as well. This TabPage provides the index as shown for WPF in my former post.

Regards,
Robert
.
Image

JSH_QA
Posts: 56
Joined: Thu Apr 05, 2012 9:03 am

Re: Tab Index of controls

Post by JSH_QA » Mon Oct 27, 2014 11:37 am

Thanks Robert,

I think we are talking at cross purposes. I am not referring to TabPages.

Where, on a typical Windows dialog/form the user can hit the Tab key to move from one interactive control to the next (rather than using the mouse to move between controls), there is a tab order that identifies the sequence of controls that repeatedly hitting the Tab key will move the focus to. For each control on the tab order, the control has a tab index.

Using Ranorex, I can access the tab index for each HTML element on a web page (i.e. something where the rxpath starts /dom ). However, I haven’t found any support in the Ranorex API for doing the equivalent on Windows clients (where the rxpath starts /form ). Is there such support in the API?

Thanks,

John H.

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

Re: Tab Index of controls

Post by Support Team » Thu Oct 30, 2014 3:19 pm

Hello John,

Thank you for the clarification. Yes, I was talking about the index of the tab.

Unfortunately, it is currently not possible to retrieve the “TabIndex” from WPF and win32 applications.

In order to raise a feature request may I ask you to send it to [email protected]? We want to handle feature request via email in order to avoid misunderstandings.

Thank you in advance.

Regards,
Robert
.
Image