2 lines
582 B
JavaScript
2 lines
582 B
JavaScript
async page=>{const rows=[];for(const name of ['resources','about'])for(const width of [320,390,1440])for(const theme of ['light','dark']){await page.setViewportSize({width,height:900});await page.goto('http://127.0.0.1:65019/'+name+'/');await page.getByRole('combobox',{name:'Тема',exact:true}).selectOption(theme);rows.push({name,width,theme,...await page.evaluate(()=>({pageWidth:document.documentElement.scrollWidth,h1:document.querySelector('h1').innerText}))});await page.screenshot({path:`/tmp/progcode-ds-creative/evidence/${name}-${width}-${theme}.png`});}return rows;}
|