Results 1 to 5 of 5

Thread: Selecting Radio Button

  1. #1
    Expert Member
    Join Date
    Oct 2006
    Answers
    209

    Selecting Radio Button

    Hi, I am automating a page which has a list of radio buttons, say 1, each of which has three subradio buttons, say a, b & c.I have to click radio button 1 and then click either a, b or c.The radio buttons a,b and c have different values for their properties for radio buttons 1-whatever. egRadio buttons 2's sub-radio buttons a, b,c are different objects than Radio button 1' sub-radio buttons (they have different "values", "html tags", (xy coordinates) etc.I want QTP to do this:If I select radio button 1 and sub-radio button a, I want QTP to remember 'a' generically such as by its 'selected item index' so that when I run my test through parameters I want QTP to ALWAYS select subradio button 'a' no matter if radio button 1, 2 or 4 is chosen.

    NOTE : [This question was asked by Sohaib Mirza]


  2. #2
    Contributing Member
    Join Date
    Feb 2007
    Answers
    48

    Re: Selecting Radio Button

    The script should be something like:

    Browser("Browser").Page("Page").Frame("Frame").WebRadioGroup("WebRadio").Select "#0"

    Where, "#0" is the first radio option

    Regards,
    Ganesh


  3. #3
    Contributing Member
    Join Date
    Feb 2007
    Answers
    61

    Re: Selecting Radio Button

    Try using Virtual objects & i dont think that issue wud be reproducible


  4. #4
    Expert Member
    Join Date
    Apr 2007
    Answers
    147

    Re: Selecting Radio Button

    If this is in the matrix form, you will have to give the index as well as the selected index....


  5. #5
    Junior Member
    Join Date
    May 2008
    Answers
    1

    Wink Re: Selecting Radio Button

    I have 2 problems with Radio Buttons:

    1. Selecting a radio button - sometimes it hangs, sometimes it return nothing or the wrong selection

    2. Refreshing a radio button group. If the test is set up to input different values into an input box, and this should change the values on the radio buttons (e.g. differnt shipping charges on different addresses or weight) it appears to not update the selections.

    There appears to be a simple solution using DP in
    QTP-8.2 | The Software Inquisition

    I have not tested it yet.

    Last edited by AY Berelowitz; 03-17-2009 at 09:58 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact