All Downloads are FREE. Search and download functionalities are using the official Maven repository.

robotframework-2.7.7.atest.testresources.testlibs.RunKeywordLibraryJava Maven / Gradle / Ivy

The newest version!
public class RunKeywordLibraryJava {

    String passKwName = "Run Keyword That Passes";
    String failKwName = "Run Keyword That Fails";
    private String[] kwNames = { passKwName, failKwName };
    
    public String[] getKeywordNames() {
        return this.kwNames;
    }

    public Object runKeyword(String name, Object[] args) {
        if (name.equals(passKwName)) {
            return this.passKw(args);
        }
        else if (name.equals(failKwName)) {
            this.failKw(args);
        }
        else {
            throw new RuntimeException("Invalid keyword name: " + name);
        }
        return null;
    }

    private String passKw(Object[] args) {
        String ret = "";
        for (int i=0; i 0) {
            err += ": ";
            for (int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy