commands = JSList.toList(engine, engine.eval("rule.getExpandedCommands(" + args + ")", bindings));
} catch (ScriptException e) {
throw new SeleniumException(e);
}
}
ICommandFactory factory = context.getCommandFactory();
CommandList commandList = Binder.newCommandList();
int index = 0;
for (Object o : commands) {
Map<String, String> c = JSMap.toMap(engine, o);
String name = c.get("command");
String target = StringUtils.defaultString(c.get("target"));
String value = StringUtils.defaultString(c.get("value"));
ICommand command = factory.newCommand(++index, name, target, value);
commandList.add(command);
}
return commandList;
}