03-10-2014 07:36 AM
I am writing functional test scripts for an extjs application. The developers in my team built a QTP custom add-in for extjs. I was the one who gave them the requirements like what extjs components I need in the add-in and their properties and methods. In the add-in, they gave me two components called as ExtDialogBox for extjs dialog boxes and ExtMessageBox for the ExtJS message boxes. The dialog box in my application is like a form that pops up. Ex : Login form . The class of this dialog box in the DOM tree is x-panel. Similarly a extjs message is like Yes or no confirmation message that pops up in my application. Its class in the DOM tree is x-window.
I am not sure whether I gave the correct requirement to the developers for MessageBox and Dialogbox.
My confusion is with the script I am writing and especially the hierarchy in the script.
For Ex: If I want to click a button in the login dialog. Should the script be
When I record Login click, QTP inserts statement 1 above. But I can click the login button using statement 2 as well.
How should the hierarchy of the objects be in this case. Is statement 2 above valid in QTP? How should these pop ups be handled by QTP in general?
03-10-2014 07:15 PM
Thank you for your reply.
There isn't like an unique official structure to be followed all the times to build the test steps hierarchy. I'd say it has to be more with the minimum required properties (and hierarchy information) needed to identify the object uniquely.
For example, you will see an hierarchy when you do object spy on an object but not the same (most of the times) is used in the steps hierarchy or in object repository.
So, my recommendation is to do recording of the step in the application (or manually using the object spy to add it and then drag and drop from the repository) and from the generated step, you will know which would be a good structure for it.
I hope the above helps.
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution."