Accessible State

Ask general questions here.
atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Accessible State

Post by atom » Wed Jan 20, 2010 11:31 am

Hiya

We have a MSAA Table control, that exposes Row, and Cell elements
Each Cell element can be Read Only, or not
This is highlighted in the AccessibleState property in Ranorex Spy

Question is, how to get the AccessibleState property via ranorex api ?

FOLLOWUP: Ok can get it from Element.GetAttributeValue
But this seems to return a number - are accessible states coming from some enumeration?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Accessible State

Post by Support Team » Wed Jan 20, 2010 2:58 pm

You can use the Accessible adapter to get the accessible states as an enum, this is the recommended way:
Cell myCell = ...;
Ranorex.Accessible accessibleAdapter = new Ranorex.Accessible(myCell);
System.Windows.Forms.AccessibleStates state = accessibleAdapter.State;
The following section in the Ranorex User Guide gives an introduction on how to use Ranorex adapters:
http://www.ranorex.com/support/user-gui ... apter.html

Regards,
Alex
Ranorex Support Team

atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Re: Accessible State

Post by atom » Wed Jan 20, 2010 3:01 pm

great thanks