Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1

    Mouse - Right Click


    I am stuck with a scenario where I need to right-click on a tree node. So that a pop-up shall open where I need to perform some operations.

    I searched here, but could not find a solution to right click on a tree node.
    I searched in QTP help where it talks about configuring the Tools >> ....

    Can someone please help me.

    Thanks and Regards,
    - Raj

  2. #2

    Re: Mouse - Right Click

    Use the Fire Event method
    Ganesh Iyer
    Winds of Change

  3. #3

    Re: Mouse - Right Click

    What version of QTP & addins are you using?

  4. #4

    Re: Mouse - Right Click

    If you get hold of tree node object then use this.The object should support click.

    QTP Help for Click:

    object.Click [x], [y], [BUTTON]

    For [x] [y] you can specify micNoCoordinate

    For [BUTTON]

    micLeftBtn 0
    micRightBtn 1
    micMiddleBtn 2

    If above does not help:
    Please do specify QTP version & application type with add-in used with providing the tree node control type and/or code if applicable.
    Kind regards,
    Anand Tambey

    RSS Feed : Break To Make it Better
    A Lazy person could be the best automation professional, if he is not lazy in implementing his ideas to reduce his work. ~Anand Tambey

  5. #5

    Re: Mouse - Right Click

    How is the tree node image/object identified on spying with QTP.
    Ganesh Iyer
    Winds of Change

  6. #6

    Re: Mouse - Right Click

    Thanks all. I used the code object.Click [x], [y], [BUTTON]

    However, not able to see if it worked. But, no errors.

    Infact after right-click options shall be displayed from which I need to select an option. May be if it selects then the code is working.

    But, QTP is not able to identify the options after right-click.
    - Raj

  7. #7

    Re: Mouse - Right Click


    Try the function in this post.

  8. #8

    Re: Mouse - Right Click

    Hi Rajkumar,

    I went through the below function. But, I could not understand exactly what it does.
    Here arguments are : Mainwindow or Grid object,columntext where you want to click.

    'To click on the text
    Function Util_ClickOnObject(Byref oParentControl,Byval ControlText)
    Dim Coordinates_Left
    Dim Coordinates_Right
    Dim Coordinates_Top
    Dim Coordinates_Bottom
    bResult=oParentControl.GetTextLocation(ControlText ,Coordinates_Left,Coordinates_Top,Coordinates_Righ t,Coordinates_Bottom)
    If bResult Then
    Coordinates_X=(Coordinates_Left +Coordinates_Right)/2
    Coordinates_Y=(Coordinates_Top +Coordinates_Bottom)/2
    wait 2
    oParentControl.click Coordinates_X,Coordinates_Y,1
    wait 2
    Reporter.ReportEvent micFail,"Util_ClickOnObject","Text is not available"
    End If

    End Function
    - Raj

  9. #9

    Re: Mouse - Right Click

    Okay. What environment is this & how is the object recognized?

  10. #10

    Re: Mouse - Right Click

    My application is developed in java-flex.

    The object is recognized as 'FlexListLabel' which is a node in a tree.

    Now, QTP need to right click on the above node after which options shall be displayed from which QTP need to select one option.
    - Raj


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:28 PM.

Copyright BetaSoft Inc.