SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Dec 2000
    Location
    Pune, India
    Posts
    135
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to verify two radio buttons of same list can\'t be selected simultaneously?

    How to verify that two radio buttons of a radio list cannot be selected simultaneously?

    There is a method which returns the selected item index, also there is method to return the selected item text.

    Is there any way to verify that two radio buttons of the same radio list cannot be selected simultaneously?

    ------------------

  2. #2
    Senior Member
    Join Date
    Oct 2001
    Location
    NC, United States
    Posts
    148
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to verify two radio buttons of same list can\'t be selected simultaneously?

    Not very sure if this is what you are looking for:

    1) select items (try selecting both ie. send commands to select both) in radio list
    2) in the agent option set "Don't group radio buttons into a list" - TRUE
    3) and Verify through GetState() of individual radio buttons

    ------------------
    -gram

    [This message has been edited by gram (edited 11-05-2002).]
    -gram

  3. #3
    KS
    KS is offline
    Senior Member
    Join Date
    May 2001
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to verify two radio buttons of same list can\'t be selected simultaneously?

    Select first one and verify the second one and then select second one and verify the first one.....I guess

    ------------------

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Location
    Brookline,NH USA
    Posts
    147
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to verify two radio buttons of same list can\'t be selected simultaneously?

    You could dynamically set the Agent option as described, but that would require each button to have a declaration in the frame file. I expect he wants to keep it as a radio list (usually preferred), so here is a better way:

    Use the RadioList VerifyValue method. Look it up in the online help as it's not a simple boolean return (raises error if the item you pass as an argument is not the selected radio item). You could use this and pass a list of string if you want to ensure that multi-select is enabled, but when you want to ensure only one item can be selected you would have to trap the error.

    Just off the top of my head it might go like this for a 3 button list:
    - Set item #1
    - Set item #2 (only #2 should now be selected)
    - Set item #3 (ditto above, but #3 now)
    - use VerifyValue nested within a Do...Except such that you EXPECT the error when you check #1 & #2, but you don't expect the error when you check #3.

    ~ Fred

    ------------------

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Location
    Brookline,NH USA
    Posts
    147
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to verify two radio buttons of same list can\'t be selected simultaneously?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by John J. Miller:
    Assuming when only one Radio List is defined, I believe that such a test is unnecessary because mutual exclusiveness is an inherent part of the base class.<HR></BLOCKQUOTE>Actually, depending on the language used to develop the application under test it is possible to incorrectly implement a radio list by not grouping them properly. <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Even if it were possible, I doubt if it's directly verifiable using Silk since none of the existing RadioList methods support the return of more than one value.<HR></BLOCKQUOTE>Did you miss the posts above? There are several ways to do it, all of which may be correct. There just isn't a single method to do so built into SilkTest, but that wasn't the question...

    ~ Fred

    ------------------

  6. #6
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to verify two radio buttons of same list can\'t be selected simultaneously?

    Assuming when only one Radio List is defined, I believe that such a test is unnecessary because mutual exclusiveness is an inherent part of the base class.

    Even if it were possible, I doubt if it's directly verifiable using Silk since none of the existing RadioList methods support the return of more than one value.


    John


    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:17 AM.

Copyright BetaSoft Inc.