SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Apr 2002
    Posts
    35
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Right-Click in a .SwfTable Object

    QTP 9.5, .Net Windows App.
    I'm attempting to right-click on a specific row or sell in a .SwfTable object in a .Net Windows form. It's a native microsoft control. Right-clicking brings up a pop-up context menu specific to each row in the table. I need to get that context menu to pop up in order to perform the next function in the workflow.

    I have searched the forum and found other users with similar issues, but no soultion.

    Has anyone ever successfully done this for specific rows in a SwfTable object?

    Thanks

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Posts
    225
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Right-Click in a .SwfTable Object

    Use this code.
    objControl is the SwfTable object.
    What we are doing is getting the coordinates of the cell and clicking on the co-ordinate.

    'get the co-ordinates of the cell and right click to open the menu

    xCoord = objControl.GetCellProperty(<intSearchRow>, <intTableSearchColumn>, "x")
    yCoord = objControl.GetCellProperty(<intSearchRow>, <intTableSearchColumn>, "y")

    'right click on the table cell
    objControl.Click xCoord,yCoord,micRightBtn
    Regards,
    Kalesh

  3. #3
    Member
    Join Date
    Sep 2007
    Location
    Maharashtra, India
    Posts
    40
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Right-Click in a .SwfTable Object

    Hi,

    I have gone thru the same problem in the past.

    The most reliable solution is as follows:
    1. select the object you have to right click(in this case use select cell to select the particular cell)
    2. Then use sendkeys to simulate the right click of a mouse. The shortcut is 'Shift+F10'

    This way the script will always work no matter what resolution is set as there will be no dependency on the x,y co-ordinates.

    My thread for your ref:
    http://www.sqaforums.com/showflat.php?Ca...true#Post478080
    Thanks,
    Anuj

  4. #4
    Member
    Join Date
    Dec 2004
    Location
    Pune
    Posts
    33
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Right-Click in a .SwfTable Object

    following snippet worked for me.

    SwfWindow("windowname").SwfTable("abc_grid").SetVi ew ""
    SwfWindow("windowname").SwfTable("abc_grid").Selec tCell iRowNum, "Column_Name"
    SwfWindow("windowname").SwfTable("abc_grid").Click ,,micRightBtn
    'here toolbar is the menu displayed after you right click on table
    SwfWindow("windowname").SwfToolbar("swfname:= toolbarMenu").Select "option1"
    Test Driven approach is not Testing

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:27 AM.

Copyright BetaSoft Inc.