-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔥 feat : added automated script for taking 📸
- Loading branch information
dev-madhurendra
committed
Feb 5, 2024
1 parent
6b82da9
commit 41237ce
Showing
5 changed files
with
1,208 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const puppeteer = require('puppeteer'); | ||
|
||
async function takeScreenshot() { | ||
const browser = await puppeteer.launch(); | ||
const page = await browser.newPage(); | ||
|
||
try { | ||
await page.goto('https://sonarcloud.io/summary/overall?id=dev-madhurendra_short-my-url-frontend', { | ||
waitUntil: 'networkidle0', | ||
timeout: 60000, | ||
}); | ||
|
||
await page.screenshot({ path: '../coverage/FE-SONAR-COVERAGE.png', fullPage: true }); | ||
} catch (error) { | ||
console.error('Error during navigation:', error); | ||
} finally { | ||
await browser.close(); | ||
} | ||
} | ||
|
||
takeScreenshot(); |
Oops, something went wrong.