How to retrieve the value of Accessdescription value

Class library usage, coding and language questions.
smilinglyqing
Posts: 12
Joined: Thu Sep 29, 2011 7:00 pm

How to retrieve the value of Accessdescription value

Post by smilinglyqing » Tue Jan 28, 2014 1:48 am

Hi there,

How can I retrieve the value of Accessdescription of a list item

string list = @"/form[@controlname='frmViewer']/element[@controlname='pnlSessions']/element[@controlname='lvSessions']/list";
Ranorex.List Entries = Host.Local.FindSingle(new RxPath(list));

Swisside
Posts: 92
Joined: Thu Oct 10, 2013 10:40 am

Re: How to retrieve the value of Accessdescription value

Post by Swisside » Tue Jan 28, 2014 9:47 am

Hi !

Could you provide a snapshot of your repository ? it's kinda hard to help you without


Regards

Swiss'

NB: http://www.ranorex.com/support/user-gui ... files.html
A simple thank you always does wonders !

smilinglyqing
Posts: 12
Joined: Thu Sep 29, 2011 7:00 pm

Re: How to retrieve the value of Accessdescription value

Post by smilinglyqing » Tue Jan 28, 2014 8:18 pm

Untitled.png
Untitled.png (3.49 KiB) Viewed 779 times

Swisside
Posts: 92
Joined: Thu Oct 10, 2013 10:40 am

Re: How to retrieve the value of Accessdescription value

Post by Swisside » Wed Jan 29, 2014 8:58 am

Hi

Now I understand what you want to do better.

Below you will find the code needed to get the Accessible Description
[...]
Accessible a = new Accessible(repo.ItemWIthAccessibleDescription);
			Report.Info(a.Description);
Regards
A simple thank you always does wonders !

User avatar
mebner
Posts: 61
Joined: Tue Dec 17, 2013 6:42 pm

Re: How to retrieve the value of Accessdescription value

Post by mebner » Wed Jan 29, 2014 3:43 pm

Hi,

It is also possible to get the "AccessibleDescription" by using the "GetAttributeValueText" method of the Element class as shown below:
Report.Info("AccessibleDescription: "+repo.YourRepoItem.Element.GetAttributeValueText("AccessibleDescription"));
Regards,
Markus