Search code examples
nightwatch.js

How to read data from data base or excel file in Nightwatch?


How to create parameters in my scripts, for example instead of put the url in the script, put a variable and read an excel file or data base for example.

i have this .url("https://www.abcdef.com/#admin")

i want somethink like this .url(url readed from excel or data base)


Solution

  • The answer Sarah gave worked great!
    If you are planning on using js-xlsx, I recommend parsing the rows to JSON which makes them more readable/useable.

    See this SO answer