Page 1 of 1

Wildcard in path and user code

Posted: Fri Oct 21, 2016 12:34 pm
by bygones
Hi,

I have a xpath expression, that matches multiple elements. When adding this into a recording module via "user code", I can retrieve all of them in code via CreateAdapters.

How does this work with a code module ? There I can drag in the item from the repo, but I cannot cast it to IList, it seems to be seen as one.

Code: Select all

var repo = MySolution.Foo.FooRepo.Instance;
IList<DivTag> highlightedRows = repo.Foo.AList.highlightedRow;
which is wrong.

So, how can I get the list of matches in the code module ?

Re: Wildcard in path and user code

Posted: Fri Oct 21, 2016 12:46 pm
by odklizec
Hi,

Try this code:

Code: Select all

IList<DivTag> highlightedRows = repo.Foo.AList.highlightedRowInfo.CreateAdapters<DivTag>();