I am new to Test Advantage . I am using Test Advantage 7.3 with QTP 9.2
I am not able to click on menu.
I want to click on Close button on the top .
Swfwindow("PTM 2010.2 (8.0.0c)").SwfToolbar("_MainMDIForm_Toolbars_Dock_Are").
ClickToolbarTool "ToolbarsManager,Toolbars,ExcelUIToolbar","Close"
Attached is screen shot for .Net Spy and Application
I am not able to click on the Key inside the Toolbar . I am able to indentify that the Key exist inside the tool bar using the following code .
I am using Testadvance 2007 vol 3 clr2
set cToolbars = SwfWindow("PTM 2010.2 (8.0.0c)").SwfWindow("Open Contract").SwfToolbar("_pnlBottom_Toolbars_Dock_Area_").Object.ToolbarsManager.Toolbars
Set oMyTool = GetToolFromToolbar(cToolbars,"UltraToolbar1", "Go")
Function GetToolFromToolbar(byref cToolbars, sToolbarKey, sToolKey)
Dim oToolbar ' Toolbar object
Dim bToolbarFound
Dim bToolFound
bToolbarFound = false
bToolFound = false
msgbox cToolbars.Count
For x = 0 to cToolbars.Count - 1
If sToolbarKey = cToolbars.GetItem(x).Key Then
set oToolbar = cToolbars.GetItem(x)
bToolbarFound = true
Exit for
End If
Next
msgbox oToolbar.Tools.Count
If bToolbarFound = true Then
For x = 0 to oToolbar.Tools.Count - 1
If sToolKey = oToolbar.Tools.GetItem(x).Key Then
Set GetToolFromToolbar = oToolbar.Tools.GetItem(x)
'oToolbar.Tools.ToolClick sToolKey
bToolFound = true
If bToolFound = false Then
Reporter.ReportEvent micFail, "Tool Not Found","Tool [" + sToolKey + "] not found in the Toolbar [" + sToolbarKey + "]"
Else
Reporter.ReportEvent micFail, "Toolbar Not Found", "Toolbar ["+sToolbarKey + "] not found in the collection supplied"
If bToolFound = true Then
' cToolbars.ClickNavToolbarTool "Go"
'oToolbar.Tools.ToolClick "Go"
Reporter.ReportEvent micPass, "Tool Found","Tool [" + sToolKey + "] found in the Toolbar [" + sToolbarKey + "]"
'Call ClickToolKey (sToolKey)
' cToolbars.ToolClick sToolbarKey,sToolKey
End Function
I have tried using method like
cToolbars.ClickToolbarTool "UltraToolbar1", "Go"
'cToolbars.ClickNavToolbarTool("Go")
Try using the below function:
cToolbars.ClickRibbonTool Menu & ":" & Group , cToolbars.Key
I tried following but they did not work
TabsCount = SwfWindow("PTM 2010.2 (8.0.0c)").SwfWindow("Open Contract").SwfToolbar("_pnlBottom_Toolbars_Dock_Area_").
GetNAProperty("Ribbon.Tabs[0].Groups.Count")
tried using this but getting message object does not support this message
attaching the screenshot of the .Net GUI Spy