如何使Rational Functional Tester在网格的每一行上执行记录的动作? [英] How to get Rational Functional Tester to perform the recorded action on every row in a grid?

查看:100
本文介绍了如何使Rational Functional Tester在网格的每一行上执行记录的动作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在编辑Rational Function Tester脚本时遇到问题.我有一个应用程序,可以测试用户在何处创建对其他公司产品的请求.所有请求都垂直设置在网格中,并且所有请求都具有相同的查看按钮以提供更多数据.

I'm facing a problem editing a Rational Function Tester script. I have an application to test where the user creates a request for different company products. All the requests are set vertically in a grid, and all the requests have the same view button to provide further data.

我需要通过查看按钮来验证所有请求中是否存在数据.一世 记录了一个脚本,单击查看"按钮,确认数据是否存在, 然后返回主屏幕,并与第二个屏幕执行相同的循环 查看按钮.

I need to verify the existence of data in all the requests via the view button. I recorded a script where I click the view button, verify the existence of data, and then come back to the main screen and perform the same cycle with the second view button.

如何让RFT使用所有查看按钮执行此验证?

How can I get RFT to perform this verification with all the view buttons?

推荐答案

您将要使用find函数来获取所有查看"按钮的列表,然后使用循环来单击所有这些按钮.类似于以下内容:

You will want to use the find function to get a list of all the View buttons, and then use a loop to click through all of them. Something like the following:

TestObject[] buttons;
buttons = document_myPage().find(atDescendant(".text", "View", ".class", "HtmlButton"), false); 
for (int j = 0; j < buttons.length; j++)
{
    GuiTestObject currentButton = (GuiTestObject)buttons[j];
    currentButton.click();
    //more code here...
}

这篇关于如何使Rational Functional Tester在网格的每一行上执行记录的动作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆