Reputation: 11
i am trying to automate a .net based windows application using UFT
here i am facing a problem using the swftoolbar options,i am using UFT 12.01 with .NET ad in loaded. This is the code i used to add a media item which gives rise to a dialogue box in our application
SwfWindow(...).SwfToolbar(....).Press "Add New Media"
when we use “ .press” or “.select” operator for any option present in the right click menu, UFT hangs after performing the operation and i have to manually close the dialogue box every time it appears in order to make UFT run again.the dialogue box is being identified correctly, but execution stops at the above mentioned line
also tried the following ways but can’t find a way to solve it
Using select operator:
SwfWindow(...).SwfToolbar(....).select "Add New Media"
Getting the option in a variable and selecting it:
Var1= SwfWindow(...).SwfToolbar(....).GetItem(0)
SwfWindow(...).SwfToolbar(....).Press Var1
also tried using descriptive programming but it didn’t worked out.
i have tried using the shortcuts for the right click menu options and it works perfect.
i can't rely on shortcuts for every option as the application has a lot of right-click options
if anyone found the answer please post it, it would be a great help for my project
Upvotes: 0
Views: 2560
Reputation: 103
You should try emulate mouse if normal right click is not working. With web based apps it works pretty fine:
Setting.WebPackage("ReplayType") = 2
obj.rightClick
Setting.WebPackage("ReplayType") = 1
You can try to add coordinates if it won't work.
Upvotes: 0
Reputation: 11
got solved the problem with UFT 12.02... download the UFT 12.02 patch and install.. Its working fine now
Upvotes: 1