Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with radio button
#1
Solved: 11 Years, 4 Months ago
Hi
I am a newbie and just joined the forum. please help me on this.

I created a QTP script where the cursor is on 1 radio button by default and i selected another radio button and then continued with the script and ran the script. the error that i get is :

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

Please advice

Swathi
Reply
#2
Solved: 11 Years, 4 Months ago
Hi Swathi,

Try using the option number on the radion button options. For example:
Code:
Browser("Browser").Page("Create an Evaluation Order").WebRadioGroup("EC:rblTemplates").Select "#2"

Cheers
Kathy
Reply
#3
Solved: 11 Years, 4 Months ago
I tried that .. still the problem exists. The line where the error occurs in displayed below. this might give you some idea.

----
Code:
Browser("Identity Theft Prevention").Page("LifeLock - Enrollment").WebRadioGroup("WebRadioGroup").Select "#0"
-----

Please advice ...
Reply
#4
Solved: 11 Years, 4 Months ago
Hi Swathi

Is your site radio button name is WebRadioGroup?

Also if you leave the radio button selection as per default when recording, does it run fine after?

Cheers
Kathy
Reply
#5
Solved: 11 Years, 4 Months ago
My radio button name in the website is " choose monthly plan ".
Yes, if I leave the default button as it is and run the script, it runs fine.
Reply
#6
Solved: 11 Years, 4 Months ago
For different radio buttons use case select statements...For Ex:

Code:
Dim rb

rb= 1 (say) // you need to parameterize this

Select Case rb
      Case 0     Browser("Identity Theft Prevention").Page("LifeLock - Enrollment").WebRadioGroup("WebRadioGroup").Select "#0"
      Case 1   Browser("Identity Theft Prevention").Page("LifeLock - Enrollment").WebRadioGroup("WebRadioGroup").Select "#1"
    
   End Select
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#7
Solved: 11 Years, 4 Months ago
Hi ...

When i get the message as below :
---- Confirm that the specified item is included in the object's item collection ---- does this mean that i need to add something in the repository or anywhere else before starting the test. Because i tried different codes and scripts and get the same error. So is there anything i need to change / add before starting my test.

Please advice ...

FYI : My company just started with the tools so i am the 1st one using it and this is the first test ever created on this tool here.

swathi
Reply
#8
Solved: 11 Years, 4 Months ago
Check that object is in repository.that's why you get the this kind of error.
Reply
#9
Solved: 11 Years, 4 Months ago
I checked the OR ... the object is there. I am trying to attach a screen shot of the OR which has the object properties for your understanding but unable to do so as it says the file size is high.
So i will list out the properties that are there in the OR :
Name :Webradiogroup
Class : Webradiogroup
html tag : input
Type, Value : Index , 1
Enable smart identification :true

Do I need to make any changes to it

Thanks
Reply
#10
Solved: 11 Years, 4 Months ago
Hi Swathi,

On the example of I gave you previously, the name of the radio button was taken from doing the view source (of the web page that contain the radio buttons).I.e.

Code:
<input id="EC_rblTemplates_2" type="radio" name="EC:rblTemplates" value="17660683" /><label for="EC_rblTemplates_2">CS-University Course Questionnaire</label>

I copied the value of "name" to WebRadioGroup("EC:rblTemplates"), and for which radio button selected, I use the order of the option, i.e. input id = .... 2 so Select "#2".

Hope that helps.

Cheers
Kathy
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP 11 is unable to recognize prime faces components ,for ex: List and radio butt pradeep singh 8 7,004 02-27-2013, 04:42 PM
Last Post: pradeep singh
  How to click a radio button inside a webtable silpavinod 9 13,667 01-24-2013, 04:09 PM
Last Post: vishalu.vs
  Problem with SAP GUI Button inside SAPGuiGrid manishnangalia 14 15,355 07-12-2012, 03:36 PM
Last Post: manishnangalia
  Radio Buttons petes85gt 0 3,350 02-22-2012, 03:41 AM
Last Post: petes85gt
  Using a Radio Button within a WebTable michiusa69 6 27,673 04-07-2011, 06:22 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)