Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a way to select dynamic option of an object in run time?
#5
Solved: 11 Years, 4 Months ago
Yes, thats the best approach.

1. First Find the Object ( I guess in your case it is a weblist ).
2. Find the number of items in the object ( getroproperty("itemscount") )
3. Use For loop to iterate between the count ( For i =1 to itemcount)
4. Select the item based on the index cummulatively (for eg : Select(i) )

Sample Code,

Code:
itemcount = Browser("IE").Page("Product").WebList("id[MGP915]").GetRoproperty("itemscount")

For i = 1 to itemcount
   Browser("IE").Page("Product").WebList("id[MGP915]").Select i
Next

Does this help ?
@Azeem - Can you explain your true intention behind the screenshot ?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.


Messages In This Thread
RE: Is there a way to select dynamic option of an object in run time? - by basanth27 - 10-20-2009, 02:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  swfwindow object name getting changed after each run saniya 1 1,686 10-10-2018, 09:02 PM
Last Post: TheGlovner
  Object Name Is Also A Dynamic Value zunebuggy 0 1,147 05-16-2017, 09:53 PM
Last Post: zunebuggy
  Object identification is taking too much time JACKSPARROW 0 1,701 01-17-2017, 11:08 AM
Last Post: JACKSPARROW
  QTP not recogonising object during run time Lavanya N 2 3,727 10-28-2015, 12:46 PM
Last Post: vinod123
  Writing to Run time data table Neetha 5 12,174 08-27-2015, 10:18 AM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)