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

学习RFT来自网络

2010-06-08 23:22 417 查看
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.

[/code]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: