SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Feb 2004
    Posts
    339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Recognition In .NET

    Hi opensta1. A few questions, are you saying that the object's Name property is dynamically generated or is it the Label that the user sees on the web page? I'm not sure but it almost sounds like QTP is creating a new instance of the same object in your Object Repository and just appending the number you are talking about.


    As a side question are you using the MI .Net Add-in for QTP?

  2. #2
    Junior Member
    Join Date
    Mar 2004
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Recognition In .NET

    The object's name property is dynamically generated in my case. Does that clarify my issue?

  3. #3
    Junior Member
    Join Date
    Mar 2004
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Object Recognition In .NET

    Hi All,

    We are using QTP v6.5 to test a .NET web-based application. For some lists on the webpage, the object ids are generated dynamically so it appends a no. (after the under-score) at the end of the object name.

    The issue is that this no. changes between the time the scripts was recorded and re-played (unless we re-store the database to a same starting state). Does anybody has experienced a similar scneario? If yes, please share any thoughts/solutions.

    Thanks.

  4. #4
    Senior Member
    Join Date
    Feb 2004
    Posts
    339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Recognition In .NET

    Ok so the Name is dynamic, how does your application determine what to call the object? Is there a naming convention?

  5. #5
    Junior Member
    Join Date
    Mar 2004
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Recognition In .NET

    The convention is to append a numeric value at the end of the object name. ASP.NET does it to make it unique so we are not controlling this from our internal application. To give an example, following are properties of an instance.

    type - text
    html tag - INPUT
    html id - rlQual0_cat2_DayRate_5

    and some other location and size parameters that are too common to be unique. Thanks.

  6. #6
    Senior Member
    Join Date
    Oct 2002
    Location
    Federal Way, WA
    Posts
    756
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Recognition In .NET

    Warning: I did this all with the IE DOM so I don't know how it would work with the dynamic coding or the Object Repository.

    Take a look at the label associated with the control. Does it have the property .htmlFor?

    I had to do a really convoluted thing where I would search all the labels for the text associated with the control I was trying to use. Then I would use the value in the .htmlFor property to get the ID of the control I'm trying to work with.

    There is another situation in the same app where I had to take the ID for the label and then parse out the unique part. (Everything to the left of the underscore.) I then took that and combine it with the part of the INPUT control name that was consistant from run to run. This allowed me to identify the control I wanted to interact with.

    It was a big pain but it dealt with the problem I had with identifying controls in a .NET web application.

    MArk B.
    If you're a slave to your free associations, does it automatically become something else?

  7. #7
    Junior Member
    Join Date
    Mar 2004
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Recognition In .NET

    Thanks for the response Mark. Our pages don't have any property with the name '.htmlFor'.

  8. #8
    Member
    Join Date
    Jun 2004
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Recognition In .NET

    are there any add-ins reqd so that some third party controls can be recognized in .net application

  9. #9
    Senior Member
    Join Date
    Feb 2004
    Posts
    339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Recognition In .NET

    Tantya, I am pretty sure Mercury doesn't have a seperate 3rd party add-in from the 6.5.1 .Net add-in.

 

 

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.00%
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 04:49 PM.

Copyright BetaSoft Inc.