SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Jun 2006
    Location
    India
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    unable to identify button

    I have two buttons in my application and they have same properties and name and one is present on the top and another at the bottom. I have used index number to identify, but it is giving the error as it still needs unique identification property. Can you please help me with this?

    B("p").P("p").Webbutton("name:=xyz","index:=0","ht ml tag:=Button").click
    Kooltestingkings

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: unable to identify button

    try to get child objets og type "button" and select/press the second button you find (or the first if you need)
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  3. #3
    Senior Member
    Join Date
    Jun 2006
    Location
    India
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: unable to identify button

    can you please put it in the form of code. I am not able to get you.
    Kooltestingkings

  4. #4
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: unable to identify button

    [ QUOTE ]
    can you please put it in the form of code. I am not able to get you.

    [/ QUOTE ]

    search the forum. one fine example (there are many more)
    http://www.sqaforums.com/showflat.ph...;Number=410550
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  5. #5
    Senior Member
    Join Date
    Jun 2006
    Location
    India
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: unable to identify button

    I am able to get the count of the child objects as 2 of the button, but how should I use those child objects and click on the button.

    Set oDesc = Description.Create()
    oDesc("micclass").Value = "WebButton"
    oDesc("name").Value = ".*Add and Select More"
    oDesc("visible").Value = True
    set oPage=Browser("Par").Page("Par")
    set colCBs = oPage.ChildObjects(oDesc)
    msgBox colCBs.count()
    Kooltestingkings

  6. #6
    Junior Member
    Join Date
    Aug 2007
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: unable to identify button

    For i=0 to colCBs.count()-1
    colCBs(i).getROProperty("name")
    .....
    ....
    Next

  7. #7
    Senior Member
    Join Date
    Jun 2006
    Location
    India
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: unable to identify button

    I am getting the name of the button, but how should I use it so that I can click button. I am using Descriptive programming and I have selected name property as uniquely to click the button, so now how should I use the name which I got from childobjects to click on the button.
    Kooltestingkings

  8. #8
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: unable to identify button

    B("p").P("p").Webbutton("name:=xyz","index:=0","ht ml tag:=Button").click

    This is wrong as Buttons have HTML tag as INPUT.

    Try this with the correct name
    B("p").P("p").Webbutton("name:=xyz","index:=0").cl ick

 

 

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 06:26 PM.

Copyright BetaSoft Inc.