selenium - Pass parameters for each browser using Protractor -


just got started protractor e2e testing.

i want pass parameters (login , password) each instance of chrome selenium server. want test same spec file different user account in parallel.

this conf.js :

 capabilities: {         'browsername': 'chrome',         'chromeoptions': {             'args': ['--disable-web-security']         },         count: 10     }, 

you can handle protractor's params on command line. example, can start each test different username/password this:

protractor conf.js --params.username user1 --params.password password1 

then, in test, use them this:

logintomyapp(browser.params.username, browser.params.password); 

you can set defaults in config file (see docs details).


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -