Micro Focus QTP (UFT) Forums
How to expand and collapse a tree structure in a web page - 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: How to expand and collapse a tree structure in a web page (/Thread-How-to-expand-and-collapse-a-tree-structure-in-a-web-page)



How to expand and collapse a tree structure in a web page - qtplearner88 - 04-03-2012

Hi All,
The application I am testing is having a tree element. Please refer to the screenshot for the screenshot.
Like this there are many places in the web page which has this.
I am trying to write a function which will expand/collapse this tree element.The function should be generic.ie,it should work in all the sub-portlets of the web portal.

Can anyone help me here.?


RE: How to expand and collapse a tree structure in a web page - supputuri - 04-03-2012

Hi,

You need a recurcive function which will perform the action until it reach the child tree item.

Let me know if you need any help on this.



RE: How to expand and collapse a tree structure in a web page - supputuri - 04-03-2012

Hi,

You need a recurcive function which will perform the action until it reach the child tree item.

Let me know if you need any help on this.



RE: How to expand and collapse a tree structure in a web page - qtplearner88 - 04-04-2012

Hi supputuri,
It would be helpful if you can give me an example
Thanks
qtplearner


RE: How to expand and collapse a tree structure in a web page - qtplearner88 - 04-05-2012

I need help to write a function which will click + or - as shown in the attached screenshot. Please help me in this.