Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to select dynamic checkbox from web dropdown
#1
Solved: 9 Years, 9 Months ago
Hi All,

I am trying to write the script in QTP which will randomly pick the checkboxes in the dropdown everytime the script is run.
Each checkbox has a unique number followed by the label. I would like to print all the labels whose check boxes were chosen.
The check box numbers are not in sequence.

Thanks a lot for your help.
Reply
#2
Solved: 9 Years, 9 Months ago
There will be pattern associate with the labels, find the pattern. Get the list items count and generate the random numbers based on your requirements to append with the label. Now you have the dynamic list item property ready for use - hope you can take it forward from here.
Thanks,
SUpputuri
Reply
#3
Solved: 9 Years, 9 Months ago
Here is what i did.
Code:
Function xx()
Dim yy
yy=Array("1","2","3"...., "19")
Randomize
SelectedProperty=yy(Int(Rnd*19))
Print("selected:"&SelectedProperty)
xx=SelectedProperty
End Function

I call this function in my script. Everytime the script is run it chooses the random property from the list.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with Select checkbox from data table value jayraocourts 0 1,043 11-01-2019, 10:25 PM
Last Post: jayraocourts
Sad How To Find Dropdown Object based on Values from the dropdown list mesg2anil 12 32,772 12-19-2017, 10:25 PM
Last Post: sandy2404
  how to select value from google search box dropdown +QTP prajyot 0 2,651 06-28-2017, 06:30 PM
Last Post: prajyot
Sad Click checkbox using its label name. venkatesh9032 1 3,033 08-10-2015, 10:33 PM
Last Post: kotaramamohana
  Problem selecting in a dropdown menu during playback. qemls29 9 12,429 07-28-2015, 05:44 PM
Last Post: Sharan

Forum Jump:


Users browsing this thread: 1 Guest(s)