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
Hey Mike,
I checked with the developers in here and they ascertained that it is a statebuttontool. I tried with several times with Checked and it would say that the property name is not correct. I am just heading towards a roadblock. Not sure how to go ahead with this issue.
Any ideas Mikey ??
Hi Robert,
Looking back to your original post, you are using Windows components in a web environment, which is an unsupported environment. While it may work it is not gauranteed, I believe it not recording may be related to that. As to the property not found, if the tool is in fact a state button, Checked is a valid public property. It should be stated that GetItemProperty is case sensitive, so you must use it as Checked not checked. Let me know if that helps you.
Mike,
Thank you for clearing the doubts. I tried recording on the toolbar button but it does not bring up any line of code for any of the buttons on the toolbar. I tried with the getitemproperty for checked but it says "Passed property name not found". Also i tried with various other properties associated, but in vain. I spoke to few developers and found that it is a statebuttontool but the property of the button being checked or unchecked is at the infragistics code level which they dont have access to.
Can you please take a look at it and let me know your thoughts.
Warm Regards,
Robert.
EnabledResolved determines if the tool is enabled, not if it is checked. If you are able to click on, and interact with a tool than it is highly likely that it is not disabled and therefore EnabledResolved will return true, that is expected. Also the ToolPath and ToolKey I gave you previously was specific to a sample app on my machine, using it as a whole or in part will not work with your application because you would not have tools with that key or path.
What it sounds like is that you have a StateButtonTool, that you are trying to determine what state the button is in. In which case you can use the GetItemProperty method as I stated before, but instead use the property specific to StateButtonTools called Checked instead of EnabledResolved. As to the PathToTool and ToolKe, I would suggest recording a Click on the tool, this will give you the correct Path and Key for that tool.
I wasnt able to attach the image. Any alternative ??