Vinh
Vinh

Reputation: 944

How to get the customise project list (Lookup) in HP Quality Center using OTA

I'm trying to use the OTA API to get the attributes for my test objects. Some of these entries have the type "Lookup". The lists are available in the Customize -> Project List.

I tried my luck with CustomizationList, but somehow I'm stuck its children. It only show up the numbers of entries not the complete list.

...
TestFactory nodeFactory = node.TestFactory;

foreach (dynamic attribute in nodeFactory.Fields){
    //read the attribute
    CustomizationList children = attribute.Property.Root.List;
}
...

Any idea?

Upvotes: 1

Views: 1037

Answers (1)

Vinh
Vinh

Reputation: 944

After trying out a bit I figured out a solution for myself:

CustomizationListNode childNode = children.RootNode;
List cNodes = childNode.Children;

foreach (CustomizationListNode ccNode in cNodes) {
     Console.WriteLine("List Item:" + ccNode.Name);
}

I hope it helps others to get the project list (Lookup List)

Upvotes: 2

Related Questions