Find specific records in a SwfTreeView on different node levels - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Find specific records in a SwfTreeView on different node levels (/Thread-Find-specific-records-in-a-SwfTreeView-on-different-node-levels) |
Find specific records in a SwfTreeView on different node levels - lotos - 10-06-2017 Hi guys, I have some hard time figuring out how to select specific items in a dynamic SwfTreeView. So next are the details: The tree looks like here: [attachment=1427] - every element inside it has a checkbox (all parents and childs) - the child items are dynamically generated (sometimes there could be no childs under some of the parents) - parent items are always same - 1st & 2nd parents have the Expand/Collapse function as they have child items (but might not have sometimes) - 3rd parent does not have an Expand/Collapse functionality as it has no child elements (but might have sometimes) The issue is that I need to build a function which has 2 input parameters (e.g. docType [the parents] & docName [the childs]). Now I need the function to be smart enough in order to handle next cases (also the case when a parent node does not have childs - it should be ignored & reported and if randomizer was used to generate it then re-do (randomize so only a correct/existent parent is chosen and one which actually has childs): Code: Public Function Fn_PrintDocuments(docType, docName) Suggestions? I've been fighting it the hole day and found different ways online but neither worked for me as I could not fully complete the work. Thank you. |