In my QTP script, I need to be able to click on a button in a TreeView. I can access/activate the cell it's in:
SwfWindow("SwIFT").SwfTreeView("_AttributesEditorUltraTree").ActivateCell "\3\1", "Value"
I asked the developer and he said I could do something like this:
_AttributesEditorUltraTree.Nodes[0].Cells[1].EditorResolved.ButtonsLeft[0].Click
to stimulate a click on the button. This doesn't work when I try it in QTP.
SwfWindow("SwIFT").SwfTreeView("_AttributesEditorUltraTree").Object.Nodes["\3\1"].Cells["Value"].EditorResolved.ButtonsLeft[0].Click
as I get a 'Expected end of statement' error. What am I doing wrong?
Thanks,
Rebecca
Rebecca,
Please provide me with more details on what the editor button does. I am asking this because if the button only modifies the value of the editor, then the changes to the value of the cell should be recorded and could be played back. Does that work in your application? If so is this sufficient for testing your application?
I am also looking into an approach for clicking the editor button and will follow up on that next week.
This functionality is not available in TestAdvantage. I am going to submit this as a feature request on your behalf. You will receive more information on this through the support case.
Michael S.
As a follow up, the developer told me that the EditorResolved (CellEditor) is an EmeddableEditorBase. For cells with buttons. it is an EmbeddableEditorButtonBase which contains 2 collections of EditorButton (ButtonsLeft and ButtonsRight).
Hope this helps. Let me know if you need more information.