学习RFT来自网络

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.

posted @ 2010-06-08 23:22  Jessica's World  阅读(510)  评论(0编辑  收藏  举报