简体   繁体   中英

How can I create a test script in QTP which performs right click operation under any windows folder?

I want to create a test script in QTP which when I execute does 'Right mouse button' operation on any windows folder and select any specified Popupmenu eg. Refresh.

I have added the folder under QTP OR and its reflects the black folder area as 'WinList'.

This is the added OR hierarchy that I added: Window("abc").WinObject("Items View").WinList("Items View")

So Basically i want to perform RMB Operation over this WinList and select any option under the PopupMenu.

Use Description Object for collecting data of all object which you are interested in. Here is nice how-to. Then spy object (to click on - in your case WinList object) and manage its properties by WinListEntry.SetToProperty("propertyName","valueToSet") to locate and click custom menu entry.

Window("abc").WinObject("Items View").WinList("Items View").Click micNoCoordinate, micNoCoordinate, micRightBtn

should do the job.

Source: Online help of WinList.

I hope you get the pun intended ;-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM