右键单击 rcptt 无法重播

Right Click in rcptt not working on Replay

我正在开发一个编辑器,在任何给定的字符串或标记上,当我右键单击时,我会得到一个包含各种选项的菜单。

我能够记录 rcptt 测试场景,即右键单击,然后访问菜单并选择一个选项。

但是当我重放案例时,测试失败了,因为它没有在那个地方找到特定的字符串或标记,因此它没有在右键单击时获得菜单。

如何记录和回放在编辑器中某个特定位置执行的操作?

记录的代码:

get-editor Programs | get-table | 
select [get-item -path "C:\Users\kaneezr\Documents\Full with job_Aug2015\SOURCE\CBSRC" -index 6] | 
get-menu -path "Zoom Source" | click
with [get-editor AJCS1132 | get-table] 
{
    get-cell 61 1 | mouse down Right -count 1
    get-cell 61 1 | mouse up Right -count 1
    get-menu -path "Variable Where Used/All References" | click
}

在我添加了我想要右键单击的元素的正确 x 和 y 坐标后,它开始工作。

with [get-editor AJCS1132 | get-table] { get-cell 84 1 | mouse down -button Right -x 200 -y 5 get-cell 84 1 | mouse up -button Right -x 200 -y 5 get-menu -path "Variable Where Used/All References" | click }