SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Apr 2004
    Location
    California
    Posts
    292
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    object\'s description error??

    Hi Team,

    I have a script which Randomly clicks on one of the links which are available in the web application. The problem is if two or more links have the same name then QTP throws the following error:

    The "chkBOX" object's description matches more than one of the objects currently displayed in your application. Add additional properties to the object description in order to uniquely identify the object.

    Any ways to solve this issue? Attached is the screenshot of the application to help you get the visual.
    Attached Images Attached Images

  2. #2
    Senior Member
    Join Date
    Feb 2003
    Location
    FL, USA
    Posts
    3,646
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: object\'s description error??

    Lynne

    I have not failed. I've just found 10,000 ways that won't work" --Thomas Edison

  3. #3
    Member
    Join Date
    Apr 2004
    Location
    California
    Posts
    292
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: object\'s description error??

    That article did not help.. any other suggestions..

  4. #4
    Senior Member
    Join Date
    May 2005
    Location
    Chennai
    Posts
    687
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: object\'s description error??

    best way is to add a property which is unique for the object
    With Best Regards
    Yuva

  5. #5
    Member
    Join Date
    Apr 2004
    Location
    California
    Posts
    292
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: object\'s description error??

    Hi Yuva,

    The problem is that links value keep on changing. At one time two links might have the name ABC123 and next time it might be XYZ321.. So how do I add that to object property.

    The goal is to make it click any random link and it should not complain if two or more links have the same name..

  6. #6
    Senior Member
    Join Date
    Apr 2002
    Location
    South Africa
    Posts
    273
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: object\'s description error??

    If two objects are identified by the same identifier then uniqueness is ensured by the index property. The first link on the page (top down left to right) will be indexed as zero with the second appearing as index 1, etc.

    If you know whether/not there are more than one of the same name then you can add the index to those links. If you don't know then you could add the "index:=0" property to object identification. This will make the selection pseudo random as only the first instance will be within the selection process but your script shouldn't die.

  7. #7
    Senior Member
    Join Date
    Mar 2006
    Location
    Bristol, UK
    Posts
    1,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: object\'s description error??

    I don't know if this wil work, and I'd be interested to know if it does!

    Basically, if you use Descriptive Programming to high level where all the check boxes are indetified the same, the index may still work.

    e.g.

    <font class="small">Code:</font><hr /><pre>
    sRandomNumber = Cstr (Int((10 * Rnd) + 0))

    Browser("micclass:=Browser").Page("micClass:= Page").WebCheckBox("micclass:=WebCheckBox", "index:=" &amp; sRandomNumber).Click
    </pre><hr />

 

 

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 9.09%
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:47 PM.

Copyright BetaSoft Inc.