-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify_docs.py
More file actions
28 lines (23 loc) · 822 Bytes
/
Copy pathverify_docs.py
File metadata and controls
28 lines (23 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import asyncio
from playwright.async_api import async_playwright
import os
async def main():
async with async_playwright() as p:
browser = await p.chromium.launch()
page = await browser.new_page()
files = [
'docs/index.html',
'docs/architecture.html',
'docs/roadmap.html',
'migridDocs.html',
'migrid-docs-roadmap.html'
]
for file in files:
file_path = 'file://' + os.path.abspath(file)
print(f'Verifying {file}')
await page.goto(file_path)
screenshot_path = 'screenshot_final_' + file.replace('/', '_') + '.png'
await page.screenshot(path=screenshot_path, full_page=True)
await browser.close()
if __name__ == '__main__':
asyncio.run(main())