Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
305
Add WinMenu objects into QTP
posted

Hi,

In my application, I need to right click on a read only text and it displays 3 options. I need to verify these 3 options are displayed correctly. The commands to right click are -

SwfWindow("ABC").SwfWindow("XYZ").SwfWindow("MNO").SwfTable("Note").RightClick "0", "0;NoteText"

SwfWindow("ABC").SwfWindow("XYZ").SwfWindow("MNO").SwfTable("Note").SelectMultiple "", "", ""

SwfWindow("ABC").SwfWindow("XYZ").SwfWindow("MNO").SwfTable("Note").SelectRow "0"

After right clicking, if I want to select "Edit" option (one of the 3 options above), the command is -

SwfWindow("ABC").SwfWindow("XYZ").SwfWindow("MNO").SwfTable("Note").WinMenu("ContextMenu").Select "Edit"


But, how can I verify if the option "Edit" is displayed correctly in the right click menu or not?

Thanks,

Rakesh


Parents
No Data
Reply
  • 29105
    Offline posted

    Hello Rakesh,

    We have created a sample that comprises of an ultragrid and a contextmenustrip. When testing I am able to get the following line code similar to match what you have already accomplished.

    SwfWindow("MNO").SwfToolbar("contextMenuStrip1").Select "Edit"

    Can you please answer the following questions:

    1. What is WinMenu object? Is this an Infragistics control?
    2. Can you clarify your request, 'displayed correctly'? What are you trying to achieve?

    As you can tell by my sample, the most QTP will figure out is which item is selected. We are not aware of any other options.

    3. Can you verify that our sample (please see below), is closely accurate to your application?

    Let me know if you have any questions.

     

     

     

    ContextMenuTestExe.zip
Children