SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Mar 2007
    Location
    Mumbai, India
    Posts
    257
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Subtitute to DOM

    Hi,

    I am currently using DOM model to identify the objects and perform actions on them. Its the fastest way(As per my current understanding) and I wanted to stick to it. But unfortunately the changing requirements are making me rework on the same things again and again.

    Another way I think of is using "Nativeobject.Find" and "Find" method. I consider preferring Find method. But this makes the script execution very slow. Is there any faster way where I can uniquely identify objects on the basis of there properties and at the same time can run scripts at a speed as good as scripts using DOM to identify objects
    Regards,
    Performance Learner

  2. #2
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Subtitute to DOM

    Hi,

    I'd recommend using Name Mapping in this case (see the "Name Mapping" help topic). You can create aliases for the needed objects to obtain them in a quick and convenient way. Also, in this case, you won't have to modify your entire scripts, you will need to modify just property values in the Name Mapping scheme.
    Jared - AQA Support

  3. #3
    Senior Member
    Join Date
    Mar 2007
    Location
    Mumbai, India
    Posts
    257
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Subtitute to DOM

    hi jared,

    Thanks for suggestion. To be honest I used name mapping much earlier when I started automating using TC but it really isn't a very convincing way. Earlier I was not aware of different tree models in TC so I kept on useing the default hybrid one. Later I discovered DOM feature I really liked it but now even the new requirements demand change in the itemnanes. I guess otherwise DOM is a great way

    One question Jared.. IF the source index(that the DOM uses to identify the object) remains same for an object but the location of the object changes then will the code change at my side?

    I gues DOM has this advantage over hybrid model that it is independent of the path of the object in the HTML

    Thanks
    Regards,
    Performance Learner

  4. #4
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Subtitute to DOM

    Hi,

    If object names on your page change, you still can use Name Mapping. You just need to avoid using names to recognize objects. You can recognize them, for example, by the innerText property or another property whose value is stable. Also, you can use several properties that provide unique recognition criteria together.

    [ QUOTE ]
    IF the source index(that the DOM uses to identify the object) remains same for an object but the location of the object changes then will the code change at my side?

    [/ QUOTE ]
    Objects in the DOM model are located at the same hierarchy level. So, your code won't depend on their exact location unless they're moved to another frame.
    Jared - AQA Support

  5. #5
    Senior Member
    Join Date
    Mar 2007
    Location
    Mumbai, India
    Posts
    257
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Subtitute to DOM

    You mean to say I can create an array and store properties in that and can pass in instead of source Idnex in DOM?

    Using find we can do that but tht makes script executino pretty slow.
    Regards,
    Performance Learner

  6. #6
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Subtitute to DOM

    Hi,

    Not exactly. I suggest using Name Mapping (see the "Name Mapping" help topic).
    Jared - AQA Support

 

 

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.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:36 PM.

Copyright BetaSoft Inc.