2016-02-19 2 views
0

Nous construisons un framework IBM RFT basé sur Excel, pour lequel nous voulons appeler des méthodes individuelles RFT (pas le script de test qui peut être exécuté depuis la ligne de commande) à partir d'un fichier java externe.Invoquer la méthode RFT de la classe java

Quelqu'un a un aperçu à ce sujet?

Merci à l'avance.

-Sreenisha Sreenivasan

Répondre

1

Que diriez-vous faire de script comme le script RFT du pilote et de la lecture Excel et l'exécution de la méthode ..

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