-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for custom configuration in the test #32
Comments
e.g. username / password for login |
👍 |
Here's my proposal for this: protractor should export its configuration object as exports.config = {
params: {
username: 'julie',
password: '1234'
},
// ... whatever else you need
} and then the command line Would result in your tests having access to: protractor.config; // equals {username: 'fred', password: '1234', additional: 'foo'} Does this meet everyone's needs? |
👍 |
Would you allow the config params to have a deep structure? For example, would you be able to modify this? exports.config = {
params: {
login: {
user: 'julie',
password: '1234'
}
}
} Would you be able to change this? protractor --params login.user=fred |
Adds a config object 'params' which is passed directly to instances of protractor. 'params' may contain nested objects, and can be changed via the command line as: --params.login.user 'Joe' --params.login.password 'abc' This change also switches to using optimist to parse command line flags for more flexibility and better usage documentation. Closes angular#32.
config is always undefined with protractor version 1.0.0. |
or just |
Can I remove a parameter byu command line? |
Hi, i have two questions. // conf.js
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: [],
multiCapabilities: [{
'browserName': 'chrome',
'specs': ['protractor-spec.js'],
'count': 5, //number of instances
'shardTestFiles': true, //execute instances of browser simultaneously
},
],
params: {
answers: {
max:10,
min:1,
}
},
}
|
Just for the records, the way to do it is:
As in 02cb819 |
Can I use it for pass to config.js file the tags that I would like run?. For example:
In my config.js file:
|
Folks may want to introduce most custom configuration via the command line than just the baseUrl. Should allow for this.
The text was updated successfully, but these errors were encountered: