jp.vmi.selenium.rollup.RollupRule Maven / Gradle / Ivy
package jp.vmi.selenium.rollup;
import java.util.List;
import java.util.Map;
import javax.script.Bindings;
import javax.script.ScriptEngine;
import javax.script.ScriptException;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import com.thoughtworks.selenium.SeleniumException;
import jp.vmi.script.JSList;
import jp.vmi.script.JSMap;
import jp.vmi.selenium.selenese.Context;
import jp.vmi.selenium.selenese.command.CommandList;
import jp.vmi.selenium.selenese.command.ICommand;
import jp.vmi.selenium.selenese.command.ICommandFactory;
import jp.vmi.selenium.selenese.inject.Binder;
/**
* Rollup rule.
*/
public class RollupRule implements IRollupRule {
private final ScriptEngine engine;
private final Map rule;
RollupRule(ScriptEngine engine, Map rule) {
this.engine = engine;
this.rule = rule;
}
@Override
public String getName() {
return (String) rule.get("name");
}
@Override
public CommandList getExpandedCommands(Context context, Map rollupArgs) {
List