0

我有一个项目,其中有几个自定义 GUI 元素,我试图找到一种方法,在它们之上构建某种代理,比如在,等SWT之上构建的默认代理。有没有办法做到这一点? 创建自定义子类并使用它(让 RFT 使用它?)来识别这些自定义 GUI 元素会非常方便,例如,因为现在这些控件由 RFT 已知的最好的类处理,例如or ,因此不可能公开这些类的自定义属性进行测试,而测试这些元素的最佳方法是通过图像比较。LabelsTextsGuiTestObjectKTableCompositeScrolledComposite

如果这是不可能的,那么有没有办法以某种方式从 a 中获取对实际 ui 组件的引用GuiTestObject?我在调试模式下尝试过,但看起来,该引用以某种方式被有意隐藏了。有没有办法绕过这个,并以某种方式访问​​参考?(我既没有使用调试器,也没有使用反射,看不到实际的 ui 元素)。

任何帮助是极大的赞赏!

4

1 回答 1

0

The TestObject that you have available in the script should represent the actual object in the AUT. As you said the methods exposed to the script would be limited to what is provided by the TestObject however RFT has API called "invoke" that you can use to invoke some method directly on the control. You should find more info on invoke here: Using Invoke in RFT

Second , you should be able to extend an Existing proxy using the Proxy SDK of RFT where you can add custom behavior for the proxies

You can get more info aobut proxy SDK here: Proxy SDK in RFT

于 2014-02-28T04:43:44.517 回答