Micro Focus QTP (UFT) Forums
ASP AJAX tabs count and click ??? - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: ASP AJAX tabs count and click ??? (/Thread-ASP-AJAX-tabs-count-and-click)



ASP AJAX tabs count and click ??? - swetha.b - 01-12-2010

Hi All,

This is the issue I am facing with asp ajax tabs located in a page.
Please have a look at the attached images:
tabs-guest.jpg : I am supposed to get the count of the tabs in this page and click them one after the other.

Here is the code I have used:
Code:
Set obtab = description.Create
obtab("class").value = "ajax__tab_tab"  ('Each tab class)

'used the above line to get the childobjects count
set tbclick = browser("TalonPro Solutions").Page("TalonPro Solutions").ASPAjaxTabs("id:=ctl00_ContentPlaceHolder1_ajxtabconGuestDetails").ChildObjects(obtab)
a = tbclick.count()
msgbox a

'msgbox reads '0' as the count.

Nother method used :

'used the for loop to to check atleast QTP able to click on the specified tab.
Set objtabs = description.Create()
objtabs("Class Name").value = "ASPAjaxTabs"
objtabs("selected index").value = i

For i = 1 to 5
Set tabscount = browser("name:=TalonPro Solutions").page("title:=TalonPro Solutions").webelement(objtabs)
tabscount.click

next

'but even this dint work.

Please have a look at tabs-spy.jpg also to get an idea of the object properties.

Can anybody help me on this please ??

Thanks
Swetha


RE: ASP AJAX tabs count and click ??? - 1981.madhu@gmail.com - 01-12-2010

As per my understanding What ever properties r given in DP ,that r not sufficicent to identify the required tab.
Use micclass etc.
class name always conflict to diff object class.

Use the properties which give correct def.of obj.