Results 1 to 6 of 6

Thread: EXTJS and QTP

  1. #1

    EXTJS and QTP

    Let me go directly to the conclusion: Applications built purely on extjs are not QTP friendly. All object identifiers like HTML id will be dynamic so canít be used for object identification.

    Smart identification will kneel down in front of extJS as every object is dynamic and continuously changing. Smart identification will identify different object every single time, especially after AUT (Application Under Test) has gone to new release/build. So Smart identification needs to be disabled.

    You might resort to x and y coordinates (forget about abs_x and abs_y, they will fail in first instance itself) as you will hope that they might remain static. But they wonít. Even height and width of objects will change.
    You might want to try visual identifiers but even they wonít help because when reference (or Related) object itself is not static how you can take that as visual identifier relation to some other object.

    You canít use descriptive programming as even that requires some static identifiers. You may want to find specefic objects by going to object hierarchy but that wonít really work smart as every object in extJS seems to be embedded under lots of webtables. Making descriptive object with such long hierarchy wonít prove fruitful and efficient.

    Finally you may plan to use XPATH. If you work on AUT that runs primarily of Firefox then you might be lucky (to be frank I didnít try FF as my AUT is Internet Explorer specific) as they are various tools that help in finding XPATH automatically for FireFox application but not many aadins or plugins are available for IE. You may find some bookmarklets on stackoverflow.com for findi but if you work in some big enterprise where IE settings are governed by company policy then even this bookmarklets wonít run because they are pure JavaScript.

    So I believe automating extJS application wonít be RoI (Return on Investment) friendly as you might (somehow!!) end up in automating AUT but that will be with too much static object identifiers and yor test scripts will be very maintainnaence intensive.

    Letís discuss on this to see if we can find some better approach for extJS. Thanks.

    Saurabh Hooda

  2. #2
    How about using QTP's Extensibility capability?

  3. #3
    Face the same issues with Selenium. Best thing to do is to work directly with development and have them insert something you can key off of that will be static, like a custom css class. Alternatively, you can use javascript to interact with extjs itself on the page which has a css like query language to return objects. Which again would require some developer assistance.

  4. #4
    I also faced the same issue with Tibco UI...in that also html id's are genated dynamically, but i manged for some objects with innertext and some with indexes and DOM

  5. #5
    Check whether it can be achieved using Dom , You can use IE Developer Tools for object analysis.
    Today is always better than Tomorrow
    My Blog
    My LinkedIn

  6. #6
    We've done it as follows:

    1. Our developers have given us a couple of attributes (say, xTYPE and xID) that allow us to identify the major GUI components.
    So, if our app has the concept of a ComboBox (which is a container that holds a Label, Input box, Trigger icon etc.), we get two attributes for the container:
    xTYPE = "ComboBox"
    xID = "RegionCombo"

    2. We've written an addin that maps the xTYPE's to new UFT test object classes and provides an xID property for each class.

    3. We add the new ComboBox objects to the object repository, identifying them using the xID's.

    4. We've written a function library that adds methods for each new component (using RegisterUserFunction). So for the ComboBox class we have a Select method which uses css/xpath to locate and click the trigger icon inside the container, then locates and clicks the required item.

    That's it - it works (until the next version of ExtJS!!!).



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 05:58 PM.

Copyright BetaSoft Inc.