Hi,
I need your help on how to retrieve the text from "c" attribute from a listItem. I have the following implementation below. However, I am receiving an exception that it object is not set to an instance of an object.
Thank you so much for the help.
How to retrieve attribute value from Dynamic in listitem
How to retrieve attribute value from Dynamic in listitem
You do not have the required permissions to view the files attached to this post.
Re: How to retrieve attribute value from Dynamic in listitem
Hi Jill,
First of all, you will need a different path, that points to all of your list items.
In your case, this would be possible by adding "/listitem" at the end of your path of your "MoveletList" element.
So, the path should end with //list@type='na']/listitem
This will be a path to all of the list items.
Afterwards, you need to adapt your code a little bit.
Use the following:
This should work.
regards, qwertzu
First of all, you will need a different path, that points to all of your list items.
In your case, this would be possible by adding "/listitem" at the end of your path of your "MoveletList" element.
So, the path should end with //list@type='na']/listitem
This will be a path to all of the list items.
Afterwards, you need to adapt your code a little bit.
Use the following:
Code: Select all
IList<Ranorex.ListItem> list = repo.Movilizer.ContainerHv.MoveletListInfo.CreateAdapters<Ranorex.ListItem>();
foreach (Ranorex.ListItem item in list) {
string moveletCategory = item.Element.GetAttributeValueText("c");
...
...
}
regards, qwertzu
Re: How to retrieve attribute value from Dynamic in listitem
Hi qwertzu,
It actually works! Thank you!
It actually works! Thank you!