sarya
15 years agoFrequent Contributor
Clicking on folder expand icon on web page to show sub-folders
Hi,
I am trying to click on the '+' icon adjacent to 'Demo' folder and expand the sub-folders underneath it.
I used the code like this but it expands some other folder everytime I run this code. The problem is that all the '+' icons on the webpage have same object properties and only the ID differs and if I use the ID to click that icon,the next time when I delete and recreate the folder,it changes and code fails. Can someone please tell me how to go about this?
I am trying to click on the '+' icon adjacent to 'Demo' folder and expand the sub-folders underneath it.
I used the code like this but it expands some other folder everytime I run this code. The problem is that all the '+' icons on the webpage have same object properties and only the ID differs and if I use the ID to click that icon,the next time when I delete and recreate the folder,it changes and code fails. Can someone please tell me how to go about this?
all = page.document.frames.ifmfolder.document.all;
a = page.NAtiveWebObject.Find("outerText","demo");
icon = a.parent.FindChild("namePropStr","plus.gif");
icon.onclick();
Thanks,
Sumedha