Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Itereate through Link Items
#2
Solved: 11 Years, 8 Months, 3 Weeks ago
Hi..
The above approach might NOT work as expected when you have only one link in the page. This is because, QTP uses index property only when multiple objects are found. When there is only one object, index property is simply ignored, so the above loop will repeat indefinitely. (even if you set index=10000, QTP's Exists property will return the value as True; but they all refer to same Link here)

So, Take the count first and proceed.

Code:
Set chObj = Description.Create
chObj("micclass").Value= "LINK"
chObj("html tag").Value ="A"
chObj("class").Value ="arrow_normal"

objCount = Browser("IDD Portal Login").Page("IDD Portal").ChildObjects(chObj).count
Reply


Messages In This Thread
Itereate through Link Items - by lucster - 04-28-2011, 10:22 PM
RE: Itereate through Link Items - by vIns - 04-29-2011, 10:53 AM
RE: Itereate through Link Items - by lucster - 04-29-2011, 05:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] [WPF] DataGrid: get items of ControlTemplate robertosalemi 0 3,613 07-14-2016, 07:52 PM
Last Post: robertosalemi
  SwfList: unchecked all items robertosalemi 0 2,061 12-21-2015, 03:46 PM
Last Post: robertosalemi
  Select Menu items shilpaS 1 7,341 06-19-2015, 01:23 AM
Last Post: supputuri
  Object Spy not detecting items in C ICL AndyBSG 5 4,699 11-28-2014, 09:32 PM
Last Post: AndyBSG
  to verify the presence of items in wpf application Priyanka2 0 2,569 10-10-2013, 03:52 PM
Last Post: Priyanka2

Forum Jump:


Users browsing this thread: