0

I have a process in Slimerjs that I run through a child_process Nodejs and I need to pass it some arguments.

I know how to use cli args with Nodejs

var args = process.argv.slice(2);

And also with Casper

var casper = require("casper").create();

casper.echo("Casper CLI passed args:");
require("utils").dump(casper.cli.args);

casper.echo("Casper CLI passed options:");
require("utils").dump(casper.cli.options);

casper.exit();

However, I don't know how to use them in Slimerjs. Any ideas?

Thanks

ackuser
  • 5,681
  • 5
  • 40
  • 48

1 Answers1

1

SlimerJS documentation is pretty vocal about using arguments: https://docs.slimerjs.org/current/api/system.html#args

var system = require('system')
var numberOfArg = system.args.length;
var thirdArgument = system.args[2];
Vaviloff
  • 16,282
  • 6
  • 48
  • 56