Hi guys,
I am using QTP9.5 for automation, I am having very strange problem. I am having a piece of code to click on an item in SwfToolbar, when I run this code first time it works, but the same code doesn't work second time, and that to is happening when you are closing and opening the tab which holds the swftoolBar before calling the same code again. If the tab is kept open and you are not moving from it then it works fine.
Here is the code snippet :
toolbar is passed as as prameter to the function and the value is:
SwfWindow("<xyz>").SwfToolbar("<asdasda>")
toolBar.DropdownToolbarTool "Actions","Workflow Actions"
toolBar.ClickMenuTool "Actions,Workflow Actions","Add"
It highlights the toolbar but in 3rd line throws error saying tht the Popup(WorkflowAction) not available.
as its try to click the Main File toolbar's Edit button which is recorded as:
SwfWindow("<xyz>").SwfToolbar("mainMenuStrip")
but again if I stop the script and run it agian it will again open the new tab works for first time and then fail second time for the same reason
I don't know why its happening as its the same code in a loop, and its even highlighting the correct toolbar second time.
Thanks.