How to Identify WebRadioButton object

96 views
Skip to first unread message

Sushmita Niranjan

unread,
Apr 13, 2012, 9:28:51 AM4/13/12
to QTP eLearn Team
I am trying to select a radio button which is displayed on a popup
window, but while running throws following error :

Cannot identify the specified item of the [ WebRadioGroup ] object.
Confirm that the specified item is included in the object's item
collection.

Line (79): "Browser("My webMethods: Login").Window("My webMethods:
Search").Page("My webMethods: Search").WebRadioGroup(obj_Desc).Select
"#0"".

Here is the code i have written in QTP 10 version :

Set objVar = Browser("My webMethods: Login").Window("My webMethods:
Search").Page("My webMethods: Search").ChildObjects()

Dim ChildobjectCount

ChildobjectCount = objVar.count()

Dim strWebradioButtonvalue

Dim strWebradioButtonAllValues

strWebradioButtonvalue = Browser("My webMethods: Login").Window("My
webMethods: Search").Page("My webMethods: Search").WebRadioGroup("html
id:=jsfwmp8210:defaultForm:searchAddressTable:__row334:selectRowIndividualCheckbox").GetROProperty("value")

strWebradioButtonAllValues =Browser("My webMethods: Login").Window("My
webMethods: Search").Page("My webMethods: Search").WebRadioGroup("html
id:=jsfwmp8210:defaultForm:searchAddressTable:__row334:selectRowIndividualCheckbox").GetROProperty("all
items")

Dim obj_Desc
Set obj_Desc = Description.Create()
obj_Desc("micclass").Value = "WebRadioGroup"
obj_Desc("type").value= "radio"
obj_Desc("html tag").value= "INPUT"
obj_Desc("index").value= "1"
obj_Desc("items count").value= "0"
obj_Desc("html id").value=
"jsfwmp8210:defaultForm:searchAddressTable:__row334:selectRowIndividualCheckbox"

Browser("My webMethods: Login").Window("My webMethods:
Search").Page("My webMethods: Search").WebRadioGroup(obj_Desc).Select
"#0" ////// code throws error ate this line


Please help me to find the solution

iTeLearn Help Team

unread,
Apr 13, 2012, 12:40:17 PM4/13/12
to Sushmita Niranjan, QTP eLearn Team
Sushmita,

Please share your shared OR and URL. This might be some issue with the properties of object.

Thanks,
--
iTeLearn Help Team
tech...@iTeLearn.com
QTPeLearn.com | SeleniumeLearn.com
Join me on YouTube and LinkenIn

Sushmita Niranjan

unread,
Apr 14, 2012, 9:38:02 PM4/14/12
to QTP eLearn Team
Sorry i can not share URL

On Apr 14, 2:40 am, iTeLearn Help Team <techh...@itelearn.com> wrote:
> Sushmita,
>
> Please share your shared OR and URL. This might be some issue with the
> properties of object.
>
> Thanks,
>
> On Fri, Apr 13, 2012 at 6:58 PM, Sushmita Niranjan <
>
>
>
>
>
> sushmitaniranjan2...@gmail.com> wrote:
> > I am trying to select a radio button which is displayed on a popup
> > window, but while running throws following error :
>
> > Cannot identify the specified item of the [ WebRadioGroup ] object.
> > Confirm that the specified item is included in the object's item
> > collection.
>
> > Line (79): "Browser("My webMethods: Login").Window("My webMethods:
> > Search").Page("My webMethods: Search").WebRadioGroup(obj_Desc).Select
> > "#0"".
>
> > Here is the code i have written in QTP 10 version  :
>
> > Set objVar = Browser("My webMethods: Login").Window("My webMethods:
> > Search").Page("My webMethods: Search").ChildObjects()
>
> > Dim ChildobjectCount
>
> > ChildobjectCount = objVar.count()
>
> > Dim strWebradioButtonvalue
>
> > Dim strWebradioButtonAllValues
>
> > strWebradioButtonvalue = Browser("My webMethods: Login").Window("My
> > webMethods: Search").Page("My webMethods: Search").WebRadioGroup("html
>
> > id:=jsfwmp8210:defaultForm:searchAddressTable:__row334:selectRowIndividualC­heckbox").GetROProperty("value")
>
> > strWebradioButtonAllValues =Browser("My webMethods: Login").Window("My
> > webMethods: Search").Page("My webMethods: Search").WebRadioGroup("html
>
> > id:=jsfwmp8210:defaultForm:searchAddressTable:__row334:selectRowIndividualC­heckbox").GetROProperty("all
> > items")
>
> > Dim obj_Desc
> > Set obj_Desc = Description.Create()
> > obj_Desc("micclass").Value = "WebRadioGroup"
> > obj_Desc("type").value= "radio"
> > obj_Desc("html tag").value= "INPUT"
> > obj_Desc("index").value= "1"
> > obj_Desc("items count").value= "0"
> > obj_Desc("html id").value=
>
> > "jsfwmp8210:defaultForm:searchAddressTable:__row334:selectRowIndividualChec­kbox"
>
> > Browser("My webMethods: Login").Window("My webMethods:
> > Search").Page("My webMethods: Search").WebRadioGroup(obj_Desc).Select
> > "#0"    ////// code throws error ate this line
>
> > Please help me to find the solution
>
> --
> iTeLearn Help Team
> techh...@iTeLearn.com
> QTPeLearn.com | SeleniumeLearn.com
> Join me on YouTube and LinkenIn- Hide quoted text -
>
> - Show quoted text -

indira

unread,
Apr 14, 2012, 10:18:33 PM4/14/12
to QTP eLearn Team
Hi Sushmita,

I am not sure what is wrong.But may be you can try this, when you are
creating description
object of webradiogroup, you are giving obj_Desc("items count").value=
"0". May be you shouldn't give that
property,may be it thinks that there are no items in the webradio
group. Try that...

And also you are giving index value, I think you have more than one
webradiogroup with the same description
properties.

Indira


On Apr 13, 6:28 am, Sushmita Niranjan <sushmitaniranjan2...@gmail.com>
wrote:
> I am trying to select a radio button which is displayed on a popup
> window, but while running throws following error :
>
> Cannot identify the specified item of the [ WebRadioGroup ] object.
> Confirm that the specified item is included in the object's item
> collection.
>
> Line (79): "Browser("My webMethods: Login").Window("My webMethods:
> Search").Page("My webMethods: Search").WebRadioGroup(obj_Desc).Select
> "#0"".
>
> Here is the code i have written in QTP 10 version  :
>
> Set objVar = Browser("My webMethods: Login").Window("My webMethods:
> Search").Page("My webMethods: Search").ChildObjects()
>
> Dim ChildobjectCount
>
> ChildobjectCount = objVar.count()
>
> Dim strWebradioButtonvalue
>
> Dim strWebradioButtonAllValues
>
> strWebradioButtonvalue = Browser("My webMethods: Login").Window("My
> webMethods: Search").Page("My webMethods: Search").WebRadioGroup("html
> id:=jsfwmp8210:defaultForm:searchAddressTable:__row334:selectRowIndividualC­heckbox").GetROProperty("value")
>
> strWebradioButtonAllValues =Browser("My webMethods: Login").Window("My
> webMethods: Search").Page("My webMethods: Search").WebRadioGroup("html
> id:=jsfwmp8210:defaultForm:searchAddressTable:__row334:selectRowIndividualC­heckbox").GetROProperty("all
> items")
>
> Dim obj_Desc
> Set obj_Desc = Description.Create()
> obj_Desc("micclass").Value = "WebRadioGroup"
> obj_Desc("type").value= "radio"
> obj_Desc("html tag").value= "INPUT"
> obj_Desc("index").value= "1"
> obj_Desc("items count").value= "0"
> obj_Desc("html id").value=
> "jsfwmp8210:defaultForm:searchAddressTable:__row334:selectRowIndividualChec­kbox"
Reply all
Reply to author
Forward
0 new messages