Skip to content

Replies

0
Azeem
Azeem answered on Jul 31, 2008 3:04 PM

Okay, After quite a lot of drill through i found the solution supported by YASSA from advancedQTP.

 

Set oTools=Browser("Brwsr").Page("Pg").Frame("Frame").SwfObject("obj").SwfToolbar("Toolbar").Object.ToolbarsManager  For i = 0 to oTools.Toolbars.item(1).Tools.Count-1   a=oTools.Toolbars.item(1).Tools.item(i).Key  msgbox a   If a = "btnPostit" Then 

  status=oTools.Toolbars.Item(1).Tools.Item(i).IsPressed

   msgbox status        Exit For    End IfNext

 

 

0
Azeem
Azeem answered on Jul 29, 2008 6:37 AM

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 ?

 

0
Azeem
Azeem answered on Jul 22, 2008 10:35 AM

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:
https://www.infragistics.com/help/winforms/wintoolbarsmanager-statebutton-about-the-statebutton-tool

Here is a help link to the API Overview:
https://www.infragistics.co.kr/help/winforms/wintoolbarsmanager-creating-and-managing-toolbars-and-tools

Here is a help link to the StateButtonTool Class:
https://www.infragistics.com/help/winforms/infragistics.win.ultrawintoolbars~infragistics.win.ultrawintoolbars.statebuttontool

Here is a help link to the Checked Property:
https://www.infragistics.com/help/winforms/infragistics.win.ultrawintoolbars~infragistics.win.ultrawintoolbars.statebuttontool~checked

0
Azeem
Azeem answered on Jul 17, 2008 4:05 PM

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 ??

0
Azeem
Azeem answered on Jul 17, 2008 7:27 AM

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.

0
Azeem
Azeem answered on Jul 16, 2008 11:05 AM

I wasnt able to attach the image. Any alternative ??

0
Azeem
Azeem answered on Jul 16, 2008 10:01 AM

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.