我正在使用木偶戏去抓屏幕。但是,要加载所需页面,需要在SessionStorage(浏览器页面)中设置上下文。到目前为止,我无法做到这一点。任何帮助,将不胜感激!。
browser.newPage().then(Page =>
{ //maybe set some context here so that the page can access the context from sessionStorage
page.goto(url).then( .....)})
难道不能这样的工作吗?
await page.goto(url);
await page.evaluate(() => {
sessionStorage.setItem(...);
});