Reputation: 1152
My config.js looks like this
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['test1.js', 'test2.js'],
framework: 'jasmine2'
};
As you can see I have 2 test files, what I want to do is to use a single variable across all the specs.
How can I achieve it ?
Upvotes: 0
Views: 185
Reputation: 610
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
framework: 'jasmine2',
specs: [
'spec1.js',
'specs2.js'
],
params: {
screenWidth: 1920,
screenHeight: 1080
}
}
in order to access variable you should do smth like this in your specs:
browser.params.screenWidth
Upvotes: 1