robotframework-2.7.7.atest.testresources.testlibs.RunKeywordLibraryJava Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robotframework Show documentation
Show all versions of robotframework Show documentation
High level test automation framework
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