Login   /   Register

Object Dictionaries for generic functions

Rate this article
     2 votes, average: 4 out of 52 votes, average: 4 out of 52 votes, average: 4 out of 52 votes, average: 4 out of 52 votes, average: 4 out of 5
Loading ... Loading ...
March 29th, 2008 by Yaron Assa

Today we’ll cover a valuable technique that will enable us to greatly simplify and organize our code, by adding meta-data to our QTP objects. The technique is best used when coupled with DP, though with certain adjustments, it works fine with OR based scripts as well.

The content you are accessing is for registered users only
Registeration is FREE, quick and private.
You can either Register pr Login if you have already registered

Summery

To sum up, function patches and entanglement is a common illness, which can have dire consequences on future maintenance and code updates. This article covered one of the more successful techniques (in my experience) for dealing with these problems. The technique suites DP perfectly, since you can easily fit the object-identification into the dictionary building functions, but it can work just as well with OR based scripts.

As always, the example code snippets are the tip of the iceberg. It’s recommended you experience with these methods, and mold them into your own unique coding and scripting style.

Posted in Code Design

6 Responses to “Object Dictionaries for generic functions”

  1. Abstraction Leaks | BETA Says:

    [+]

    [...] prelude to this design was hinted in a previous article, though naturally the abstraction will be much more ordered and [...... ...

  2. heqingbluesky Says:

    [+]

    It's a good method to cope with different types of object in GUI.We are able to use a common way to make our script more easy-to-r... ...

  3. Vivekanand Says:

    [-]

    this is good method to handle such type of problem

  4. rneelam Says:

    [-]

    really this material is useful to us. thanks

  5. rajendra.penumalli Says:

    [-]

    Really very good Material. I appriciate ur woork.

  6. An improved dictionary object | AdvancedQTP Says:

    [-]

    […] articles of using it as a reserved global dictionary, a parameter storage for generic functions (here and here), and […]

Leave a Reply

You must be logged in to post a comment.

This article was viewed 2443 times