Open ch0wdan opened 9 years ago
So i my protractor {} setup to have a staging argument.
I guess the biggest thing i'm trying to solve is, how do i pass the baseUrl: thats specified in protractor args to my spec files?
What I am trying to do is get baseUrl: into browser.get() that is specified in the spec
Heres what i currently have in my Gruntfile.js protractor: { options: { configFile: 'protractor.conf.js', args: { baseUrl: 'http://localhost:9000' } }, staging: { options: { configFile: 'protractor.conf.js', args: { baseUrl: 'http://tetris-staging.com', browser: 'chrome' } } } },
@ch0wdan You can use params like below
protractor: {
....
staging: {
options: {
keepAlive: false,
args: {
params: {
baseUrl: 'http://tetris-staging.com'
}
}
}
}
You can access it in your tests file using browser.params.baseUrl like below
browser.get(browser.params.baseUrl)
Hey guys,
I'm trying to figure out how to get the Gruntfile to contain multiple baseUrl's (so i can specify for uat, staging, localhost), either specified in different protractor.config.js files.
I see we can specify a config file, is there a way to set that config file so that it will be read when we run a grunt.taskrunner such as "grunt test:e2e_uat"? Or is there a way we can set a taskrunner to read a specific baseUrl such as "baseUATUrl:"?