node.jsui-automationangular-fullstackwebdriver-io-v4

Creating a new config parameter in wdio.config.js in Node.js


I am writing an automation framework and wondering how to create environment properties file like Java.

I know wdio.config.js is the place where we hold baseURL and other stuff. Say I would like to create new placeholders like "Login" which accepts string or "username" which is a string as well. How can I implement that?


Solution

  • Just adding Login: "loginuser" or password: "password" in wdio.config.js worked. These are accessible using browser.config.loginuser or browser.config.password