Help with info pls In my work I use webdriver.io with mocha. Right now my work folder has such structure
- Tests
1.1 - pageobjects - folder with page.js classes
1.2 - resources - contain - index.js with values
1.3 - specs - folder with tests
1.4 - utilities - contains helper.js with common methods
Of course wdio.conf.js is exist
Case
in specs test1.js and test2.js are created
test1.js actions
login(name, password)
logout
test2.js actions
login(name, password)
buy coffee
logout
I run tests via running spec folder and tests execute one after another
So the question is how to created(mean I generate random String and initialize variable) only once and use it in every test. Another words I generate password (generate String) and use it in test1.js login action and then use it in test2.js in login action, and this password in test2.js is same.
Thx in advance!!