I also met this problem like mdc999 on QTP version 11. When I use object spy or do a recording, QTP seems to see the object as a generic object: SwfWindow("Prog1 Version 1").SwfObject("_FormMain_Toolbars_Dock_Area_T"), therefore I cannot get to any of the groups, tabs, buttons etc. Here is some of the info from object spy:
Native class: WindowsForms10.Window.8.app.0.bcedc3
Swfname: _FormMain_Toolbars_Dock_Area_Top
Swfname path: _FormMain_Toolbars_Dock_Area_Top;FormMain
Swftypename: Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea
SourceControl developer use are: Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea Infragistics.Win.UltraWinToolbars.UltraToolbarsManager
Please tell me step by step in detail to solve this problem.How can i use the GetNAProperty to click a button on the this toolbar ?When i try to use GetNAProperty method, QTP get an error "QTP does not support this method". Please help me ASAP.
Thanks
HoaLe,
What mdc999 reported here isn't an issue and is the expected behavior. As far as clicking the button tool, GetNAProperty is not the correct method to use as it gives access to properties of the .NET object. The easiest way to see what script is needed to click the button tool would be to record clicking on the button tool and see what gets recorded.
Since you are having issues with the GetNAProperty method, you should first verify that TestAdvantage is configured correctly. This can be done by testing playback of the sample scripts and also recording on the sample applications that are included with TestAdvantage.
The sample scripts are located in the following location:
C:\Users\Public\Documents\Infragistics\TestAdvantage for Windows Forms (HP) [Version]\Samples\Scripts
If the samples play back correctly, have you verified that you are using the correct version of TestAdvantage with your application? The version of TestAdvantage must match the version of NetAdvantage used.
Let me know if you have any questions with this matter.
Thanks for your response, but in this case, i cannot use the record, i don't want use the co-ordinate to click an object, because using the co-ordinate is not stable, sometime it's correct, sometime incorrect. So, do you have another way to solve my problem?please help me.
Thanks a lot.
You should be able to use the ClickToolbarTool method to click on an individual tool. If you need to know what parameters to pass into this method I recommend recording a new script on your application to see what the correct parameters are and then use them in the script that you are writing.
Thanks for your help, but my toolbar is not recognized as swftoolbar, it is recognized as swfObject, so I cannot use the ClickToolbarTool method or any method of swftoolbar. My toolbar is of control-Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea. If I record a click event on 'Process Payements' and then click on 'Document Maps' (please see attached image), i received the script below:SwfWindow("EZPaySuite Main Form").SwfObject("MainMenubar").Click 90,90SwfWindow("EZPaySuite Main Form").SwfObject("MainMenubar").Click 169,84
Please help me, how can I click on each items on this toolbar without using co-ordinate?
Thank you so much.
When TestAdvantage is installed, enabled, and configured correctly the mappings in the SwfConfig.xml file will cause the UltraToolbarsDockArea to be recognized as SwfToolbar rather than SwfObject. This indicates that either TestAdvantage isn't installed or isn't configured correctly on your machine.
Please verify the following:
If you do have the correct TestAdvantage version installed and you have issues running the version utility or the sample scripts fail to play back then it is likely due to a configuration issue. If the SwfConfig.xml file is corrupt, you can use the steps in this post to clear it out and add the mappings for TestAdvantage back to it.