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.
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.
How about using QTP's Extensibility capability?
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
Check whether it can be achieved using Dom , You can use IE Developer Tools for object analysis.
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