SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    May 2010
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    QTP Radio Selection Confusion

    This is something I haven't faced before in QTP.

    I am trying to select radio button on a webpage. QTP is able to recognize radio button, however value changes all the time.

    Here is example:
    Browser("XYZ Online / Home Page").Page("Account Manager Online_4").WebRadioGroup("txtradio1").Select "106462539-1263473 XYZ INSURANCE CO 000-000-0000XYZDIRECT@XYZ.COM"

    The value inside .Select changes all the time. All I can tell is that first 6 characters are set, and those characters are picked from varible.

    Now if value of variable is 9999999, then value of radio button will be .Select "9999999..................", so what do I need to put in select statement?

  2. #2
    Moderator
    Join Date
    Jan 2007
    Location
    Pittsburgh, PA
    Posts
    2,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Radio Selection Confusion

    You will need to select each button with Index and then get it's value with GetRoProperty, then write logical condition to compare the value to be selected.

    Ex:

    ic = B().P().WRG().GetRoProperty("items count")
    For i = 0 To ic
    B().P().WRG().Select "#"&i
    If ValueToBeSelected = Mid(B().P().WRG().GetRoProperty("Value"),1,6) Then 'Compare first 6 characters
    Exit For
    End If
    Next

  3. #3
    Senior Member
    Join Date
    Mar 2010
    Posts
    118
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Radio Selection Confusion

    using the "all items" property you get all the items separated by ;

    get them in an array

    use instr or regular expressions to find which one you want to select

    select the element
    Cheers!!!
    Shrikant

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 09:23 AM.

Copyright BetaSoft Inc.