Results 1 to 2 of 2
  1. #1

    get NodeByPath returns null, c# OTA

    Sorry, this is a repost, but I apparently screwed up the thread subject so I'm worried someone who might be able to help might miss the thread.

    I'm having trouble with the get_NodeByName method of the TestSetTreeManager object. Even if I try to get Root, it doesn't work.

    Here is my code (I successfully get a connection to the domain and project, so I'm leaving that part out)

    string folderPath="Root";

    TestSetTreeManager treeManager = (TestSetTreeManager)connection.TestSetTreeManager;
    TestSetFolder node = (TestSetFolder) treeManager.get_NodeByPath(folderPath);

    No matter what I've tried, it returns null.

  2. #2

    Re: get NodeByPath returns null, c# OTA

    Some further detail, if it helps:

    The following (admittedly useless, but it proves a point) code works:

    TestSetTreeManager treeManager = (TestSetTreeManager)connection.TestSetTreeManager;
    TestSetFolder rootNode = (TestSetFolder)treeManager.Root;
    TestSetFolder getNode = (TestSetFolder)treeManager.get_NodeByID(rootNode.N odeID);

    That returns the root node. However, if I replace that last line with:

    TestSetfolder getNode = (TestSetFolder)treeManager.get_NodeByPath(rootNode .Path);

    That returns null.

    What gives?! It's driving me nuts. As a work around I CAN use IDs instead of paths, but that's a lot of extra work. Paths are readily available and easily constructed in the code I have so far, keeping track of IDs will be a pain. Getting NodeByPath to work would be a huge complexity savings.



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 03:40 PM.

Copyright BetaSoft Inc.