File size: 702 Bytes
e5675eb
23078ef
 
 
 
e5675eb
23078ef
 
e5675eb
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""Export the current presentation at 2× resolution, without capture controls."""
from pathlib import Path
import sys
sys.path.insert(0,'/home/node/local/carbon-a-render/python')
from playwright.sync_api import sync_playwright
from check_presentation import BROWSER,ARGS
R=Path(__file__).parent
with sync_playwright() as p:
 b=p.chromium.launch(executable_path=BROWSER,args=ARGS)
 page=b.new_page(viewport={'width':1080,'height':1350},device_scale_factor=2)
 page.goto((R/'index.html').as_uri()+'?record=1')
 page.wait_for_function('window.POC && !document.querySelector("#loading")',timeout=60000)
 page.screenshot(path=str(R/'carbon-a-strand-poc.png'))
 b.close()
print(R/'carbon-a-strand-poc.png')