Enabling QTP log for QTP9.2,QTP9.5 and QTP10 when using flex automation

11 06 2010

In order to enable the QTP log you first need to check which version of QTP you have :

QTP 9.2:

1.  Go to the command prompt and navigate to C:\Program Files\Mercury Interactive\QuickTest Professional\bin directory and invoke MicLogSetttings.exe.

2.  Select LogCatPackTEA and LogCatPackTE and move it to “Selected Categories list.

3.  Change the level to MicLogLevelDebug2

4.  Give the folder path where you want the log to be stored.

5.  Click on Apply.

6.  Restart QTP.

QTP 9.5 and QTP 10:

1.  Go to the command prompt and navigate to C:\Program Files\HP\QuickTest Professional\bin directory and invoke ClientLogs.exe.

2.  Select QTP in the left dialog.

3.  Select LogCatPackTEA and LogCatPackTE and move it to the selected category.

4.  Change the Category level to Debug2 .

5.  Give the folder path where you want the log to be stored.

6.  Click on Apply.

7.  Restart QTP.





Unable to automate datagrid using the sdk 3.5 automation swcs that came with Flash Builder 4 release ??

7 04 2010

Hi

There is a known issue with the sdk 3.5 automation swcs which have come with the flash builder 4 release http://bugs.adobe.com/jira/browse/FLEXENT-1183 .This fix has been made and all you will need to do is download the 3.5 sdk automation swcs from here  and use them instead of the ones that come with the flash builder 4 release.





Flash Builder 4 has been released!!

7 04 2010

Finally Flash Builder 4 has been released and this is a very exciting era for Automation!In Flas Builder 4 we have provided support for AIR automation,automation of spark components as well as automation of marshalled applications!! So try it out!!





Unable to see the Flex and Air Add-ins if your machine login does not have administator rights ???

11 02 2010

I have recently got quite a few complaints from people saying that if they were to log onto their machine without adminstrator rights the Flex and AIR add ins do not get displayed in the add- in manager screen of QTP even though the flex plugin has been installed.This can be a really serious problem with customers working in large organizations where not everyone has admin right to the systems they use.

After a long discussion with HP we have come up with a solution.Just follow the below steps and you’re good to go

  1. Enter regedit in the command prompt.
  2. Go to HKEY_LOCAL_MACHINE\SOFTWARE
  3. Right click on the SOFTWARE folder and go to permissions
  4. Click on Power Users and give full control.
  5. Reboot your machine.




How to access a cell Value in a Flex datagrid ?

29 01 2010

Unfortunately currently there is no easy way to get a cell value for a datagrid.There is already an enhancement request logged for this http://bugs.adobe.com/jira/browse/FLEXENT-826 If this fix is important to you please vote on this.

As of now to access a cell value this is what you will need to do

  1. Use selectIndex to choose the particular row
  2. Use GetROProperty(“selecteditem”) to get the entire contents of that row
  3. Using the split function you can then split the row contents to the contents of each cell using | as the delimiter

 Please find the sample code below

 Browser(“Browser”).FlexApplication(“dg”).FlexPanel(“DataGrid Control Example”).FlexDataGrid(“dg1”).SelectIndex 0

RowContents  =Browser(“Browser”).FlexApplication(“dg”).FlexPanel(“DataGrid Control Example”).FlexDataGrid(“dg1”).GetROProperty(“selecteditem”)

CellContents =Split(RowContents,”|”,-1)

msgbox CellContents(0)

msgbox CellContents(1)

msgbox CellContents(2)

Hope this helps!





Facing an issue where Flex Modules are not getting recognised by QTP?

21 10 2009

This is a regression bug in the automation swcs for sdk 3.4 where in flex modules loaded using module loader are not being recognised by the Automation framework and in turn are not getting recorded in the QTP script.In case this issue is blocking your work Adobe has fixed it and uploaded the corresponding automation swcs containing that fix. Go to http://bugs.adobe.com/jira/browse/FLEXENT-1088 .Please note these AT swcs are compatible with the sdk 3.4.1 which came along with the beta 2 Flash Builder  .





Flex Automation support for Spark Components in Flash Builder beta2

5 10 2009

We have now extended automation support for Spark compnonents as well (if your wondering what are spark components,  there are the components that are prefixed with <s: like for example if u just create a project using sdk 4 you flex application will be a spark application i.e it will be <s:Application instead of <mx:Application the latter is called halo components).Previously automation support was only provided for halo components .As this feautre is still in progress we have only provided automation support for certain spark components.

List of Spark Components made automation ready for Beta 2

  1. Application 
  2. Button  
  3. CheckBox 
  4. Panel
  5. Radio Button 
  6. ScrollBar
  7. TextArea
  8. Text Input
  9. VGroup
  10. HGroup
  11. RichEditableText
  12. Slider
  13. NumericStepper

 

Also we will need to specify that Automation of these Spark Components is currently supported only for Flex applications.

Users interested in trying this new feature will need to include flash_builder_root\sdks\4.0.0\frameworks\libs\automation\automation_spark.swc along with the other automation swcs in the additional compiler arguments.





Code Hinting for Flex operations not appearing in QTP 10 ?

25 09 2009

QTP 10 as of now does not display code hinting for flex operations and this can be a real problems for users that work extensively with decriptive programming.

We are currently working with QTP to get this sorted out but till then here is a workaround which you can use.

1.Copy the TeaFlex.xml from Flex folder present inside the Flex plugin for QTP folder and the TeaFlex_AIR.xml from the AIR foder also present inside the same Plugin folder.

2.Place these xml files under the C:\Program Files\HP\QuickTest Professional\dat\Extensibility\TEA folder within the QTP10 installation.

 3.Then type regedit in the command prompt and open the registry.

4.Then you need  to add string value “C:\Program Files\HP\QuickTest Professional\dat\Extensibility\TEA” to HKEY_CURRENT_USER\Software\Mercury Interactive\QuickTest Professional\MicTest\StepInformationManager\TypeInfoFiles node in the registry.

5.Once you do this restart QTP and you will notice that the code hinting appears 🙂





Common issues faced in AIR Automation and simple ways to work around them !

26 06 2009

AIR automation as the name rightly suggests provides automation of flex/AIR components only within the boundaries of the AIR application.Normally this should be fine but as the AIR capabilities are soo awesome that they allow lots of interaction with the users system like drag drop of components from the desktop to the air app and vice versa .This is where we can fall back on the basic window recording of QTP to overcome these problems.

So lets say you want to automate dragdrop from desktop onto the AIR app or you would like to minimize/ maximize the AIR Application window this is how to go about it.

1.Just go to Automation->Record and run Settings and click on the Window Application tab.

2.Now select the first radio button ie Record and run test on any open windows based application.

Perform the required action outside the AIR app and then switch back to the 2nd option in the Windows application tab.





QTP 10 and flex automation

26 06 2009

I have seen a lot of people wondering if flex automation is supported with QTP 10 or IE8 .Well all I can say is that currently both these configurations are not officially supported by Adobe but i dont see any reason as to why these configurations shouldnt work. In case you do come across any issues please do log a bug in the adobe bugbase.