首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从java类调用RFT方法

从java类调用RFT方法
EN

Stack Overflow用户
提问于 2016-02-19 13:16:16
回答 1查看 263关注 0票数 0

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

有人对此有洞察力吗?

提前谢谢。

-Sreenisha Sreenivasan

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-02-20 03:52:42

如何将RFT脚本作为驱动脚本,读取excel并执行该方法?

代码语言:javascript
复制
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";
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35506251

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档