Find a component from a folder in Component modules through OTA (145 Views)
Reply
Occasional Contributor
vj2012
Posts: 6
Registered: ‎03-20-2012
Message 1 of 2 (145 Views)

Find a component from a folder in Component modules through OTA

Hi All,

 

I want to find a component from a path . for ex like in test plan and Test lab we have a method called FindTest and FindTestInstnace.Like wise do we have for components referred OTA reference library but it is not helping me.

 

Appreciate your help in advance.

Honored Contributor
Trudy Claspill
Posts: 3,779
Registered: ‎09-09-2010
Message 2 of 2 (123 Views)

Re: Find a component from a folder in Component modules through OTA

"Find" methods don't exist for Components in the OTA API. You will have to do it the "long" way by navigating through the ComponentFolderFactory object and using the FolderByPath method. That will give you a ComponentFolder object pointing to the Component Folder for the path you specified. Then you can get the ComponentFactory for that ComponentFolder object and use the Filter and NewList methods/properties to get the specific Component.
[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.