Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Webradiogroup
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
I am having two radiobuttons 1. yes 2. No
When i spy these two radio buttons are in a webtable and they are showing as webradiogroup

By using child objects method i got the count of webradiogroup as 1

Issue is how to click on yes or no .....Based on want i need to click..
Help me ASAP
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
use select statement to select the web radio button in a web radio group.

like:

Code:
Browser().page().webradiogroup("something").select "#0"
to select the first radio button and
Code:
Browser().page().webradiogroup("something").select "#1"
to select the second one...!!!!


Thanks,
Harish
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
Thanks harish.. its working Smile


Hi harish, can i parameterize this 0 and 1...if yes how?


I passed #0 frm datatable ... it is working fine...
can i pass only 0 with out #... ? here # means? just it will take as number 0 and number 1...?
Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
try the below to parameterize :

Code:
a = 0   ' Assign your data table values here


Browser().page().webradiogroup("something").select "#" & cint(a)


# - is needed while selecting a radio button in a radio group.
Radio buttons comes in radio group because u can select only one radio button at a time.
So QTP identifies it as a group.

Thanks,
Harish Shenoy
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to click a webradiogroup button silpavinod 2 27,943 01-17-2013, 03:31 PM
Last Post: vishalu.vs
  WebRadioGroup sqadri 4 10,019 01-13-2012, 10:48 PM
Last Post: sqadri

Forum Jump:


Users browsing this thread: 1 Guest(s)