您的位置:首页 > 理论基础 > 计算机网络

学习RFT来自网络

weixin_30505225 2019-08-04 05:38 190 查看 https://blog.csdn.net/weixin_3
原文链接:https://www.geek-share.com/detail/2487010520.html

Is it possible to set programmatically RFT playback delays accessible from "Windows > Preferences > Functional Test > Playback > Mouse Delays" menu ?

1.

setOption (IOptionName.DEALY_BEFORE_GUI_ACTION, 1.0)

- before every GUI action RFT waits 1 sec. (or the other time you choose)

2.

setOption(IOptionName.TIME_MULTIPLIER, 2)

time for replay will be twice longer

3.

sleep(2.0)

RFT waits 1 sec.

 

verify with HTML Static text

check whether "No Records Found" message or set of records availability in the screen. Normally we have check the object with its property. But in this case no objects available( like label)

how to check this text?

If you have mapped the Browser object then try like this...

public TestObject getObject(TestObject browserObject, String text){
 
TestObject errorObject = null;
TestObject[] to = browserObject.getChildren();
for(int i=0;i<to.length;i++){
 
if(to[i].getProperty(".text").toString().equals(text)){
errorObject = to[i];
break;
}

 

if(errorObject == null){
getObject(to[i],text);
}

}
return errorObject;
}

For the above method you have to pass Browser Object initially as the Object and the string as the error text.

转载于:https://www.cnblogs.com/jessica2010/archive/2010/06/08/1754380.html

标签: