protractor params
Hi,
I'm using protractor version 0.12.0. I'm trying to use the params config as follows: File onProtractorConf.js: exports.config = { // The address of a running selenium server. seleniumAddress: 'http://localhost:4444/wd/hub',
// Spec patterns are relative to the current working directly when // protractor is called. specs: ['onProtractorRunner.js'],
... params: { 'email': '[email protected]', 'password': 'somepassword', 'device': '192.168.1.2', 'server': '192.168.1.3:8080', 'webapp': 'http://192.168.1.3:8085/app.html' } };
in file onProtractorRunner.js I have: var config = protractor.config; var testerEmail = config.email; var testerPassword = config.password; var DeviceNewparingIP = config.device; var ServerNewpairingIP = config.server; var webappUrl = config.webapp;
I run the test as follows: node_modules/protractor/bin/protractor protractorConf.js
I get the following error:
config undefined F
Failures:
- Exception loading: /Users/tester/cloudcar/play/testeng/justdrive/onProtractorRunner.js Error Message: TypeError: Cannot read property 'email' of undefined
I tried also: ptor = protractor.getInstance(); var config = protractor.config;
but I get the same error.
Any ideas? Please help. Thanks in advance, Carolina
It should be var config = browser.params
Params are exposed as the params property of the protractor instance.