When it comes to testing Adobe Flex applications using automated tools – QTP (HP Quick Test Professional) surely stands at no. 1 position. With its rich support of scripting and point-n-identify interface, it becomes very easy to write automation test scripts. While I was working on one of the Flex Application, I felt a need of installing QTP on my machine.
Whether it was fortunate or unfortunate, I am using Windows 7 – 64bit operating system and I got QTP 11 installed on my machine. While I was in urgent need of doing some Automation related changes, I was stuck at the first place itself. While launching QTP, the Add-in manager was not able to detect the Flex Plug-in. I tried all the options suggested on various sites, downloading QTP plug-ins and blah blah, but none of them worked for me.
While I was bit frustrated with the Flex Add-in, I thought of giving a try over weekend and finding out what is really causing the problem. This time I tried different approach and instead of double clicking the “Install_QTP_Plugin.bat” file directly, I right clicked on it and chose “Run As Administrator” option. Puf! it asked me for permissions and a console just opened and went away. This time, I thought it worked and started QTP again, but no luck, it still didn’t work. I thought of opening the batch file to check what is actually written inside in it. There was nothing more but just registration of 3 DLL files with windows registry.
regsvr32 /s AIR/TEAAirPluginQTP.dll
regsvr32 /s Flex/TEAPluginIE.dll
regsvr32 /s Flex/TEAPluginQTP.dll
Being curious about what this command actually means and what that “/s” stuff actually means, I just typed “regsvr32” on command prompt. Bingo!!!! regsvr32 gave a nice dialog explaining what options are available and what each of those option means. The “/s” means execution of command in silent mode without any messages. I thought of removing the option and to check if there are any warning or error messages. After removing, the “/s” option from each line and executing it again with “Run As Administrator” mode, I got an error message as module not found in the directory. After looking at the console, I found that due to “Run As Administrator” option, the console was getting started at “c:\windows\system\” instead of the directory where batch was located. I added two lines at the beginning of the batch file to change the current directory path to the directory where batch file is located and saved the batch file.
Finally I again executed the batch file with “Run As Administrator” option and it successfully installed the plug-in. I started the QTP and yippeeee… it could now able to detect the plug-in.