set radiobutton in webtable

3,293 views
Skip to first unread message

QTP Beginner

unread,
May 18, 2012, 8:15:59 PM5/18/12
to Mercu...@googlegroups.com
Hi all,

I am practicing Depart webtable in http://newtours.demoaut.com/.
I want to select webradiogrp randomly in "select a flight" page.the username and pwd are test118/password.
 
Thanks in advance

Deepak Kumar Mahapatro

unread,
May 19, 2012, 12:20:37 PM5/19/12
to mercu...@googlegroups.com
try "#<radiobutton no.>"

--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en



--
Regards,
Deepak

uma mahesh

unread,
May 21, 2012, 2:02:40 AM5/21/12
to mercu...@googlegroups.com
That is not a single radio button, That object belongs to "WebRadioGroup" class.

So for this objects you need to mention the index number, syntax comes like this

Browser("Select a Flight: Mercury").Page("Select a Flight:
Mercury").WebRadioGroup("outFlight").Select "#1 or 2 or 3 what you
like"

Anish Pillai

unread,
May 21, 2012, 1:04:02 PM5/21/12
to mercu...@googlegroups.com
One important point to note here is the difference between how you access a WebRadioButton and other objects (textbox, check box, link etc) in a WebTable.

To access a WebRadioGroup we use Browser().Page().WebRadioGroup()....  i.e. WebTable is not used here.

To access any other object we use Browser().Page().ChildItem(row, col, micclass, link)..... i.e. the object is accessed as ChildItem of the Webtable.



--
ar

jay rawat

unread,
May 21, 2012, 1:35:10 PM5/21/12
to QTP - HP Quick Test Professional - Automated Software Testing
Make sure when you are handling Radio Buttons they are not having
their button ids for selection. If its the case then
you might need to fetch the id of the radio button 1st then (by
locating radio button on screen with the help of some label or any
corresponding identifier in same row) & then use Anish's code:

To access any other object we use
objRBtn = Browser().Page().ChildItem(row, col, micclass, index) '//
here index is for cell item index in which radio button is located //
RtbnVal = objRBtn.getroproperty("value")
Browser().Page().WebRadioButton(objRBtn).Select RbtnVal
then by fetching value you can further pass on in following way:

On May 21, 10:04 pm, Anish Pillai <anish.pillai10...@gmail.com> wrote:
> One important point to note here is the difference between how you access a
> WebRadioButton and other objects (textbox, check box, link etc) in a
> WebTable.
>
> To access a WebRadioGroup we use *Browser().Page().WebRadioGroup()....*
> i.e. WebTable is not used here.
>
> To access any other object we use *Browser().Page().ChildItem(row, col,
> micclass, link)..... *i.e. the object is accessed as ChildItem of the
> Webtable.
>
> *
> Cheers,
>  a n i s h
>
> [QTP Tutorial]<http://www.automationrepository.com/tutorials-for-qtp-beginners/>|
> [VBScript
> Tutorial]<http://www.automationrepository.com/category/qtp-and-vbscript-tutorials/>|
> [QTP
> Blogs] <http://www.automationrepository.com/qtp-blogs/>
>
> **
> [** Subscribe to Get New Posts in your Inbox
> **]<http://feedburner.google.com/fb/a/mailverify?uri=automationrepository...>
> *
> --
> ar

jay rawat

unread,
May 21, 2012, 1:33:42 PM5/21/12
to mercu...@googlegroups.com
Make sure when you are handling Radio Buttons they are not having their button ids for selection. If its the case then
you might need to fetch the id of the radio button 1st then (by locating radio button on screen with the help of some label or any corresponding identifier in same row) & then use Anish's code:
To access any other object we use
objRBtn = Browser().Page().ChildItem(row, col, micclass, index)   '//here index is for cell item index in which radio button is located //

RtbnVal = objRBtn.getroproperty("value")
Browser().Page().WebRadioButton(objRBtn).Select RbtnVal
then by fetching value you can further pass on in following way:



Chandra Shekar

unread,
May 7, 2014, 2:44:58 PM5/7/14
to mercu...@googlegroups.com
Trying to select the webradiogroup I.e roundtrip in clear trip.com webpage. Unable to do so request u help in writing d descriptive program

Chandra Shekar

unread,
May 7, 2014, 2:44:59 PM5/7/14
to mercu...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages