Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP10 - How to ID a generic object
#1
Not Solved
Hi,

I've got a list of objects on a page and they are all defined as "chkSourceDbCd". How do I differentiate between these objects in QTP. I would like to run though the list one by one.

Thanks for the assistance.

Bill
Reply
#2
Not Solved
HI SRA,

what the enviroment of your app and could you pls share the Object Spy and the application screenshot, so that we can give some solution.
Thanks,
SUpputuri
Reply
#3
Not Solved
Hi - please find the contents of the Object Spy in the attachment. Sorry but this is a gov't system and I can't provide a screen shot. I did try using the "value" property as each item in the list has a different one but to no avail. I believe an Index could be a better bet but this value is not apparent. I think the HTML may read the value of the index and not the value from the Object Spy. Probably from 1 to 20.


Thanks
Reply
#4
Not Solved
Hi SUpputuri,

I found that if I select each check box, QTP assigns a number to each one, starting a 0 or no number, up to 19. I just referenced the number QTP assigned to the checkbox. Then I can set the value as a parameter to ON or OFF

Code:
Browser("IFS :: Avalanche").Page("IFS :: Avalanche").WebCheckBox("chkSourceDbCd").Set "ON"
Browser("IFS :: Avalanche").Page("IFS :: Avalanche").WebCheckBox("chkSourceDbCd_2").Set "ON"
Browser("IFS :: Avalanche").Page("IFS :: Avalanche").WebCheckBox("chkSourceDbCd_3").Set "ON"
Browser("IFS :: Avalanche").Page("IFS :: Avalanche").WebCheckBox("chkSourceDbCd_4").Set "ON"
Browser("IFS :: Avalanche").Page("IFS :: Avalanche").WebCheckBox("chkSourceDbCd_5").Set "ON"
Reply
#5
Not Solved
Hi SRA,

You can use the childobject property and get the number of child objects which will meet your description in the page and then you perform the operations in the desired child item.

Let me know if you need any more informaiton.
Thanks,
SUpputuri
Reply
#6
Not Solved
Do you have some sample code to go along with your recommendation?

Thanks,
Bill
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  qtp10 does not support internet explorer8 or 9 excellentpawan 2 2,928 06-19-2013, 12:19 PM
Last Post: vinod123
  Qtp10 test not running in Firefox 13 rahullfo 3 3,847 06-28-2012, 05:27 PM
Last Post: vinod123
  Nagivate and Learn is slow in QTP11 vs on QTP10 chong67 0 2,209 06-27-2012, 09:40 PM
Last Post: chong67
  Recording problem in QTP10.0 sandya.qtp 4 4,042 01-31-2012, 08:15 PM
Last Post: Kim_H
  Objects are not getting identified (QTP10, Java application) KGKrishnan 1 3,788 01-31-2012, 09:25 AM
Last Post: sandya.qtp

Forum Jump:


Users browsing this thread: 1 Guest(s)