| || |
how to count number of portlets?
Does anyone know of any methods on how to count the number of portlets that a page displays?
For exmaple, MyYahoo has several portlets and I have been trying to figure out a way to count them as our new application will have portlets.
I can get the names or move to each portlet by using the "html id" but that is if I know the number of portlets in advance.
this is the code I have to get the portlet name in our application:
GetPortletName = Browser(oBrw).Page(oPge).WebElement( "html id:=webportlet_title_"&intPortletId).Object.innerT ext
I get it based on the html id but I would have to know that ID in advance.
Our application has differnt access levels where some will display all the portlets some will not.
I guess one work around is just to get the portlet names and put in a spreadsheet file with the user access, number of portlets they should see and then compare to the ones displaying on the page with the ones in the spreadsheet.
I would prefer just to count them at run-time.
Any suggestions would be greatly appreciated.
Re: how to count number of portlets?
I figure it out...
I was able to get the count by using child objects. I don't know y I did not try this in the first place.