Hello All,
I am working on a .Net Application with QTP 9.2 and infragistics testadvantage 2006 Volume 1 VLR 2.0. I have a swftoolbar on which are certain buttons. I would like to check for a particular button wether it is enabled or disabled and then dependingly click on it. Here is how it records the toolbar,
Browser("Browser").page("PAGE").frame("frame").swfobject("selection page").swftoolbar("tools").clicktoolbartool "ToolBar","Btnclick"
I tried the .Net windows forms spy but i wasnt able to obtain any property which was helpful in finding the enable/disable property.
Can anyone please look through and revert back ASAP.
Thank you all for your help.
Regards,
Rob
Hi Rob,
To retrieve a property of a tool on the UltraToolBarsManager use the GetItemProperty method. This allows you to retrieve any public property off of the Tool object. To know what properties are available to retrieve you can look to our online help. Here's the link directly to the 8.2 ToolBase Object. In the case of how to determine if the Tool is Enabled you can use the EnabledResolved property as shown below.
Hey Mike,
Million thanks to your reply. This was critical and i had to get through this. I am now confident that i am closer to the solution. However i feel there is something which is holding me from retrieving the property i need.
This one buttons appearance when clicked and unclicked is different from the rest. I have attached a screenshot for reference. Now this button resides within a toolbar called "TopToolbar". I tried the below,
itemstate=Browser("Browser").page("page").frame("frame").swfobject("swfobject").swftoolbar("_m_main panel_Toolbars_dock_Are).GetItemProperty("TopToolbar","btncheckpreference","EnabledResolved")
this returns itemstate as True, when checked and when unchecked. So it really doesnt make a difference. I tried the one which you had sent and it throws the error as "ToolKey not found". This is what i tried,
Set oTBmanager=Browser("Browser").page("page").frame("frame").swfobject("swfobject").swftoolbar("_m_main panel_Toolbars_dock_Are)
strPathToTool="TopToolbar",V81,V81_btnCheckPreference"
strToolKey="V81_btnCheckPreference_Size2Fit"
strPropertyName="EnabledResolved"
itemstate=oTBmanager.GetItemProperty(strPathToTool,strToolKey,strPropertyName)
Please take a look at this and let me know what is the correct approach.