I'm trying to figure out how to verify the attributes of a list of elements that each have (somewhat) matching RanoreXPaths.
I've tried creating an Adapter, and using that to fetch all matching elements. This works, and the resulting IList has the correct number of elements. When I try using GetAttributeValue() on the elements, however, I get an "Object reference not assigned to instance of object" exception.
For reference, my code is below:
Code: Select all
Adapter NativeWindowAdapter = repo.<MYSTUFF>.SelfInfo.CreateAdapter<NativeWindow>(false); IList<NativeWindow> OpenWindowList = NativeWindowAdapter.Find<NativeWindow> (<STUFF>); OpenWindowList.GetAttributeValue<String>("Instance");