Results 1 to 2 of 2
  1. #1

    ComponentFolderFactory - Folderbypath fails

    Below is the code used to access the ComponentFolderFactory by a desired path:

    Set objCFFact = tdc1.ComponentFolderFactory
    Set objParentFolder = objCFFact.FolderByPath(strParentFolderPath)
    Set objCompFactory = objParentFolder.ComponentFactory

    No success so far. My object variable 'objCompFactory' is 'not set'??!!

    Any help?

  2. #2

    Re: ComponentFolderFactory - Folderbypath fails

    I have noticed that the ByPath methods can be really picky about how you begin and end your path string.
    I have not dealt with ComponentFactories but the example below with test sets requires you to prepend the path with "Root\"
    <font class="small">Code:</font><hr /><pre>
    vdirectory = "Root\" &amp; pDirectory
    Set ttreeManager = QCConnection.TestSetTreeManager
    Set tsFolder = ttreeManager.NodeByPath(vdirectory)
    </pre><hr />

    And this eg with Tests in Test plan needs the path prepended with "Subject\"

    <font class="small">Code:</font><hr /><pre>
    Set treeM = pConnection.TreeManager
    Set folder = treeM.NodeByPath("Subject\" &amp; pTestPath)
    </pre><hr />

    So you might need to figure out what text should go in the front of the path string.

    You should also try plus and minus a leading and/or trailing back slash on the path string



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:54 PM.

Copyright BetaSoft Inc.