??RFT?????????????
???????????? ???????[ 2012/10/30 10:50:12 ] ????????
??????飺????? Rational Functional Tester??RFT????????????????????????????????????????????????????μ????????????Щ?й??? RFT ????????????п???????????顣
????????
?????????????????????????н?????????????????????????????????????????????????????????????????????????????????????????????????д?????????????????μ?????????? AUT ?????????????????????У????????????????е?????????????????????????в????????????????????????????????????????????????????????丸??????в???????????????????????????????????????????????????????2????????????????????????Щ???????л??????飬????? Rational Functional Tester ???????????????
????????????? API ?????????????????????
??????Щ GUI ?????????????????????????£??????? TestObject.waitForExistence() ????????????????????в?????????????嵥 1 ?????
?????嵥 1.
button().waitForExistence(60?? 5);
button().click();
????????Щ GUI ??????????????????????????????????????????????????RFT ??????????? waitForExistence ???????????????????????????????嵥 2 ????????? waitForInexistence????????嵥 3 ????????????
?????嵥 2.
/**
* ?ж?????????????????????????
* @param testObject ???????
* @param timeout ???????
* @param interval ????????????
* @return
*/
public boolean inexists(TestObject testObject?? double timeout?? double interval) {
long startTime = System.currentTimeMillis();
while (System.currentTimeMillis() - startTime < timeout * 1000) {
if (!testObject.exists())
return true;
sleep(interval);
}
return !testObject.exists();
}
/**
* ?????????????????????????????????????????????????
* @param testObject ???????
* @param timeout ???????
* @param interval ????????????
*/
public void waitForInexistence(TestObject testObject?? double timeout?? double interval) {
if (!inexists(testObject?? timeout?? interval))
throw new RuntimeException("TestObject doesn't disappear!");
}
?????嵥 3.
// ??? foregroundDialog???????????Щ?????????????????????foregroundDialog().close();
// ????????????????????????? click ????? foregroudialog ???
waiForInexistence(foregroundDialog()?? 10?? 2);
backgroundDialog().click();
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11