суббота, 12 июня 2010 г.

Automating Flex with QTP

Not very long ago I faced the problem of recognizing Flex objects using HP QuickTest Professional. Even with Flex 3.0.0 Add-in being installed the objects couldn't be recognized.
But it we've managed to find the reasonable solution.
So, here are the steps:
1. Launch Flex Builder
2. Create a new Flex
3. Choose it in navigator
4. Select Project > Properties > Flex Compiler
5. Type the following into the "Additional compiler arguments" field:

-include-libraries "flex_builder_dir\sdks\3.0.0\frameworks\libs\automation.swc"
"flex_builder_dir\sdks\3.0.0\frameworks\libs\automation_agent.swc"
"flex_builder_dir\sdks\3.0.0\frameworks\libs\qtp.swc"
"flex_builder_dir\sdks\3.0.0\frameworks\libs\automation_dmv.swc"

( -include-libraries works directly with Flex Builder's directory (in Windows by default it is "C:\Program Files\Adobe\Flex Builder 3\")
6. Click OK to save changes and then once more click OK to close the project's properties
7. Compile the Flex application

Speaking of negative moments, I have to mention the major two:
1. You will have to build two versions of your application in parallel (with and without flex libs) - this is not an option for some projects
2. There is a "probe effect", although it is not too severe

P.S. Works only with IE7, Flex 3.0.0 Add-in is also required.

Also available in russian.

Комментариев нет:

Отправить комментарий