Skip to content

Commit

Permalink
Fix takeScreenshot() JSDoc example (#4121)
Browse files Browse the repository at this point in the history
  • Loading branch information
dikwickley committed Mar 14, 2024
1 parent e97a90c commit a13f7dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/api/web-element/commands/takeScreenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* demoTest(browser: NightwatchAPI): void {
* const screenshot = browser.element('#main').takeScreenshot();
* screenshot.then((screenshotData) => {
* require('fs').writeFile('out.png', screenshotData, 'base64');
* require('fs/promises').writeFile('out.png', screenshotData, 'base64');
* });
* },
*
* async demoTestAsync(browser: NightwatchAPI): Promise<void> {
* const screenshotData = await browser.element('#main').takeScreenshot();
* require('fs').writeFile('out.png', screenshotData, 'base64');
* require('fs/promises').writeFile('out.png', screenshotData, 'base64');
* }
* }
*
Expand Down

0 comments on commit a13f7dd

Please sign in to comment.