You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running a test using the example mentioned gives the following error
aniket@air nightwatch % node ./bin/nightwatch ./sample/screenshot.js --chrome
[Screenshot Demo] Test Suite
────────────────────────────────────────────────────────
ℹ Connected to ChromeDriver on port 9515 (981ms).
Using: chrome (122.0.6261.112) on MAC.
Running Demo:
───────────────────────────────────────────────────────────────────────────────────────────────────
✔ Element <body> was visible after 1222 milliseconds.
✨ PASSED. 1 assertions. (1.292s)
Error
unhandledRejection: The "cb" argument must be of type function. Received type string ('base64')
TypeError [ERR_INVALID_ARG_TYPE]: The "cb" argument must be of type function. Received type string ('base64')
at maybeCallback (node:fs:177:3)
at Object.writeFile (node:fs:2272:14)
at /Users/aniket/Projects/gsoc/nightwatch/sample/screenshot.js:14:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
───────────────────────────────────────────────────────────────────────────────────────────────────
️TEST FAILURE (3.191s):
- 1 error during execution;
- 0 tests failed;
- 0/NA tests passed
Sample test
No response
Command to run
No response
Verbose Output
No response
Nightwatch Configuration
No response
Nightwatch.js Version
3.4.1
Node Version
No response
Browser
No response
Operating System
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Description of the bug/issue
The example present for
.takeScreenshot()
at https://nightwatchjs.org/api/element/takeScreenshot.htmlthrows error.
This is because the node js fs.writeFile() expects a callback at the end
https://nodejs.org/en/learn/manipulating-files/writing-files-with-nodejs
Steps to reproduce
Running a test using the example mentioned gives the following error
Sample test
No response
Command to run
No response
Verbose Output
No response
Nightwatch Configuration
No response
Nightwatch.js Version
3.4.1
Node Version
No response
Browser
No response
Operating System
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: