从Java类调用RFT方法

斯里尼莎(Sreenisha)

我们正在构建一个基于Excel的IBM RFT框架,我们希望从外部Java文件中调用RFT单个方法(而不是可以从命令行执行的测试脚本)。

有人对此有见识吗?

提前致谢。

-Sreenisha Sreenivasan

普拉卡什

如何将RFT脚本用作驱动程序脚本并阅读excel并执行该方法。

public void testMain(Object[] args) 
{

    String method = getNextAction();
    TestObject target  = getNextTarget();   
    //Using RFT's method here, Own Implementation preferred
    FtReflection.invokeMethod(method, target);      
}
//Get the next object to perform action on
TestObject getNextTarget()
{
       //Here do the operation of finding the object that may be from map or obtained using  find() api of rft 
      return untitledNotepadwindow();
}
//Get the next action to be performed, this should actually return an
//object that has a name to invoke , and arguments  to be passed.
String getNextAction()
{
    return "close";
}

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章