Tuesday 29 December 2015

HP UFT/QTP to make compatible with Mozilla

If you are having issues with UFT/QuickTest Professional recognizing Firefox, it could be because the patch installation was not able to make the appropriate modifications in the Program Files directory due to security restrictions presented by Windows7 (even if you have Administrator rights).  In this case you have to make the changes yourself with Administrative rights, and manually modify the directory and approve the security warning dialog boxes.

Getting QuickTest Pro and Firefox to work together is not difficult, but you do have to perform a couple of system modifications.  This post will discuss getting QTP v12.02 to work with Firefox up to v33 on Windows7.

Environment:
Windows7, QTP v12.02 2, Firefox up to version 33

Steps so that Firefox sees QTP:
1.Open Windows Explorer
2.Navigate to the folder where your QuickTest Pro is installed and expand the following folder underneath it: <QTP Installation>binMozilla
3.You should see a structure like in the image below.  Notice how there is now a sub-directory called “Common” with the new supported Firefox versions.QTP Directory


4.Now click on the “Common” directory and you will see a file called “install.rdf”, open this file in Notepad.
5.In the “install.rdf” file you want to copy the “em: id” under the top section which is specifying QuickTest Professional (I highlighted it in this image; do not confuse it with the “em: id” in the bottom section which relates to Firefox itself).Install RDF

6.Open another Notepad window and save it using the “em: id” from the step above as the file name (do not save it with an extension).  Now paste the full directory name to the “common” directory where QTP is installed in the contents of this new file.  The directory should look something like “C:Program FilesHPQuickTest ProfessionalbinMozillaCommon”.
7. Save the file and close it.  (It’s easier to do this process in a temporary directory due to security in Windows7, instead of in the final directory.)
8. In Windows Explorer, navigate to the folder where Firefox is installed (on my system that is “C:Program Files (x86)Mozilla Firefox”) and click on the sub-directory called “extensions”.
9.Now perform a click and drag of the file you created above in the temp directory, into this “extensions” directory.  Windows7 will prompt you with a security dialog box saying you have to have Administrator rights to do this.  Click the Continue button as long as you do (this whole process will only work if you are logged into your machine with Administrator rights).Firefox Directory

10. Now open the Firefox browser. Go to Tools -> Add-ons and you should now see the “QuickTest Professional X.X Plugin” is enabled.Firefox Addons
11. In Firefox, navigate to Google.
12.With QuickTest Pro, open the Object Spy and spy on the google search edit field.  QTP should now see the objects in your Firefox browser. In case the object is still identified as Window, make sure your firefox version is supported by the current UFT/QTP version

No comments:

Post a Comment