Node JS modules in Webdriver.io

Joined
Jan 20, 2025
Messages
1
Reaction score
0
Greetings. I would like to ask if it is possible to use node js modules in a wdio file.
Because when I write require('fs') in the file with tests I get this error:
Unable to load spec files quite likely because they rely on `browser` object that is not fully initialized. `browser` object has only `capabilities` and some flags like `isMobile`. Helper files that use other `browser` commands have to be moved to `before` hook.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,933
Members
47,472
Latest member
blackwatermelon

Latest Threads

Top