You can pass any number of arguments to the protractor. You need to pass the parameters in the protractor task in the grunt file. Here is a small fragment
config: grunt.file.readJSON('config-param.json'), protractor: { options: { configFile: "config/e2e.conf.js", // Default config file keepAlive: true, // If false, the grunt process stops when the test fails. noColor: false, // If true, protractor will not use colors in its output. debug: '<%= config.debugger %>', args: { params: '<%= config %>' } }, run: {} },
and you can access the parameters in your specifications. browser.params.fieldName
source share