WpfTable - Double click or right click on specific row

Hi,

I need to double click or right click on specific row in wpftable.

UFT version 14.53. Add ins used : .net,WPF, web


I have tried below solutions and didn't work.

1. "WpfWindow("myApplication").WpfTable("myGrid").ActivateCell 0,0"

2. For my application instead of double clicking I can right click on the row and select the required option.
 code i am using:
"WpfWindow("myApplication").WpfTable("myGrid").SelctRow 0
"WpfWindow("myApplication").WpfTable("myGrid").Click ,,1 '(perform right click)
Set objWshShell = WScript.CreateObject("WScript.Shell")

objWshShell.SendKeys "{DOWN}" '(selecting specific option from context menu)
objWshShell.SendKeys "{ENTER}"

The problem with this code is, since I can not get the x,y axis of the specific cell, the right click happens to only on the row in the middle. No matter which row I select. I tried to use send key Shift F10 instead of ""WpfWindow("myApplication").WpfTable("myGrid").Click ,,1". But couldn't figure it out.


Do we need to install any hot fixes or any third party tools to get more control on wpftable rows. Please help.

Tags:

  • Verified Answer

    Try

    WpfWindow("myApplication").WpfTable("myGrid").Type micLShiftDwn

    WpfWindow("myApplication").WpfTable("myGrid").Type micF10

    WpfWindow("myApplication").WpfTable("myGrid").Type micLShiftUp

    We can also try device replay:

    Set dr = CreateObject("mercury.devicereplay")
    dr.KeyDown 42
    dr.KeyDown 68
    dr.KeyUp 42
    dr.KeyUp 68
    Set dr = nothing

    This code just sends key strokes so you have to make sure the AUT is in focus when it is executed.

  • Hi

    Thank you for the quick reply. It worked like a charm. I was able to use both set of codes . However, do let me know if you have some ideas on performing a double click on the wpftable row.

    Thank You