【问题标题】:Invoke RFT method from java class从java类调用RFT方法
【发布时间】:2016-02-19 13:16:16
【问题描述】:

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

有人对此有见解吗?

提前致谢。

-Sreenisha Sreenivasan

【问题讨论】:

    标签: rft


    【解决方案1】:

    制作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";
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多