I am using testadvantage 2008 vol 2 with QTP.
I can get the tabs count and tools count in each tab of the ribbon , but unable find the names of the tabs and tools inside the tabs.
GroupsCount = SwfWindow("X").SwfToolbar("_MDIForm_Toolbars_Dock_Area_To").GetNAProperty ("Ribbon.Tabs[0].Groups.Count")OptionsCount = SwfWindow("X").SwfToolbar("_MDIForm_Toolbars_Dock_Area_To").GetNAProperty ("Ribbon.Tabs[0].Groups[2].Tools.Count")
I tried SwfWindow("X").SwfToolbar("_MDIForm_Toolbars_Dock_Area_To").getcontent
but its giving the error. Please give me a solution or link to the related posts.
To Get a Ribbon Tab caption use:
SwfWindow("X").SwfToolbar("...").GetNAProperty ("Ribbon.Tabs[0].Caption")
To get a Group caption:
SwfWindow("X").SwfToolbar("...").GetNAProperty ("Ribbon.Tabs[0].Groups[0].Caption")
To get a specific tool caption inside the ribbon group
SwfWindow("X").SwfToolbar("...").GetNAProperty ("Ribbon.Tabs[0].Groups[0].Tools[0].CaptionResolved")
I hope this is helpful
Ammar
Thanks it worked ...Also have a small doubt.
I even tried following code with worked
SwfWindow("x").SwfToolbar("x").GetNAProperty ("Ribbon.Tabs[0].Key")
Can I know what is the difference in using 'key' and 'Caption' methods
which one is the best one to use ...
Thanks,
Tulasi
key is the equal to the tab name (it cannot include spaces) Caption is the visible text on the tab. if the caption is empty I think the key will get displayed instead. Also the key must be unique while Caption can be duplicated
I hope this was helpful
In our application we have used one ribbon toolbar which consists of 4 tabs.I want to click on the tools present in the second tab.
Second tab consists of 2 tools one is named as "Read" and another one as "Send"
Recorded script for both the tools looks like this:
SwfWindow("VinPro 1.0.3.0").SwfToolbar("_ulblProfileCapturePeriod_Tool").SelectRibbonTab "Meter"SwfWindow("VinPro 1.0.3.0").SwfToolbar("_ulblProfileCapturePeriod_Tool").ClickRibbonTool "Meter:","Read"SwfWindow("VinPro 1.0.3.0").SwfToolbar("_ulblProfileCapturePeriod_Tool").ClickRibbonTool "Meter:","Send"
When I play back the script it is throwing the error as
The specified Tool [Send] does not exist
Line (4): "SwfWindow("VinPro 1.0.3.0").SwfToolbar("_ulblProfileCapturePeriod_Tool").ClickRibbonTool "Meter:","Send"".
Read button is getting clicked succesfully.
Read button is present under tab2-Group 0 , Send button is present under tab2 group1.
Any help on this will be appreciated.
Thanks in advance
Hello Ashwini,
Please provide the following information:
1. Version of QTP with all installed patches.2. Version of the .NET Add-In with all installed patches.3. Version of .NET runtime application was built with.4. Full version of NetAdvantage used in AUT.5. Full version of TestAdvantage.
In QTP 9.0 and later the version of QTP and the .NET Add-In and patches can be obtained on the Product Information page. The product information page is accessible from the about window.
To obtain the full version of NetAdvantage used in the AUT (application under test) you can look at the version of the NetAdvantage assemblies provided with the AUT or you can ask your developers. To obtain the version from an assembly, right click the assembly in Windows Explorer and select Properties. On the Properties dialog, from the Version tab, look for the Assembly Version.
The full version of TestAdvantage being used can also be obtained from the assemblies. By default the TestAdvantage assemblies are located in the "C:\Program Files\Infragistics\TestAdvantage [version]\Bin" folder.
May I ask if you are still encountering the "specified Tool [Send] does not exist" error you raised in this thread? We will be happy to assist you with this issue, however we will need the information requested by Dave F to assist you further. Also, please note that CAS-99339-M7G7G9 has been created to ensure you support for this issue.
Please let me know if you have any questions regarding this matter.