Downloading BLOB or access chrome pdf-viewer

Hi all…

I’m trying to download blob, that is generated inside javascript and served to chrome. I’ cant handle it using page.on(‘download’) because there is no such event emited.

async function playwrightDownload(element, page, logger){
  const [popup] = await Promise.all([
  await playwrightSleep(10000, popup)
  await popup.saveAs("a.pdf")

So I tried to access chrome download viewer, and click on download button there, but it looks like there is no chance to access shadow-doms

I also tried to work using page.on('popup') and this was successful but as I said above, I didn’t found the way how to access download button, within the pdf-viewer (#download)
Only element that I can access within the pdf-viewer are //embed and its childrens… So I cant’ find a way how to work with the ‘menu items’ of the pdf-viewer

Is there any way how to do this? Or is there any way how to download this pdf that is only opened and generated as blob? (even in the page content, there is no direct url to download pdf, all url-s are ‘blob:https://…’