【问题标题】:Right Click in rcptt not working on Replay在 rcptt 中右键单击无法重播
【发布时间】:2018-07-18 15:42:57
【问题描述】:

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

我能够为执行右键单击、然后访问菜单并选择一个选项的场景记录 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
}

【问题讨论】:

  • 你用的是什么类型的编辑器?它是基于画布的吗?还是基于星云?你能分享一些记录下来的代码吗?
  • @Adam 我已经编辑了帖子并添加了记录的代码。我们使用简单的 TableViewer 作为编辑器。
  • 在我添加了我想要右键单击的元素的 x 和 y 坐标后,它起作用了。 code 与 [get-editor AJCS1132 |获取表] {获取单元格 84 1 | mouse down -button Right -x 200 -y 5 get-cell 84 1 |鼠标向上 -button Right -x 200 -y 5 //|双击 get-menu -path "使用的变量/所有引用" |点击}

标签: eclipse-rcptt


【解决方案1】:

在我添加了我想要右键单击的元素的正确 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 }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-03-21
    • 1970-01-01
    • 2012-11-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-26
    • 2016-08-01
    相关资源
    最近更新 更多