How to get Rational Functional Tester to perform t

2019-09-04 12:53发布

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.

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

标签: rft
1条回答
Summer. ? 凉城
2楼-- · 2019-09-04 13:59

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...
}
查看更多
登录 后发表回答