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
Okay, After quite a lot of drill through i found the solution supported by YASSA from advancedQTP.
status=oTools.Toolbars.Item(1).Tools.Item(i).IsPressed
Again I would highly suggest you take this to Developer support, replay back to the email they sent, there you can attach your image and work it out in more detail with them. As to GetSelection, it will return a value for every Checked StateButtonTool in the toolbar. It would also have thrown an error if you supplied a path to a non-existant toolbar. The fact that it is not throwing an error means that you did supply a correct path to a valid toolbar, and that toolbar has no checked StateButtons in it. Now perhaps you actually do not have statebuttons, or they are not actually checked. I would try clicking on them and checking the value again. If the value doesn't change perhaps they are disabled, or they are not really state buttons, either way, at this point contact developer support.
Mike,
There is another method supplied alongwith Testadvantage for a toolbar called "GetSelection". I read through the help but i wasnt able to get it working.
a=Browser().page().frame().swfobject().swftoolbar().Getselection("TopToolbar")
msgbox a
It returns a blank. The statebutton i am trying to access is under a ToolbarsManager - TopToolbar - btncheckpreference. How do i supply the path for the Getselection method ???
Can you please take a look at it mike ?
I contacted the developers at infragistics and they seem to resolve it at the "Checked" state. I am clueless now because we all converged at the same point. However he forwarded a few links which gave some inner details but i wasnt able to get it working. Would you please take a look at the link and see if you can help me out in any way.
I am unable to attach any image. Do i have a alternative on how to upload the .Net spy screenshot ??
Here is a help link to the StateButton Tool:http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WinToolbarsManager_StateButton.html
Here is a help link to the API Overview:http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WinToolbarsManager_API_Overview.html
Here is a help link to the StateButtonTool Class:http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Infragistics2.Win.UltraWinToolbars.v8.2~Infragistics.Win.UltraWinToolbars.StateButtonTool.html
Here is a help link to the Checked Property:http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Infragistics2.Win.UltraWinToolbars.v8.2~Infragistics.Win.UltraWinToolbars.StateButtonTool~Checked.html
At this point I would suggest you contact our developer support as they would be able to give a bit more of a hands on approach to assisting you with this matter.