# Downloading BLOB or access chrome pdf-viewer

**URL:** <https://forum.robotframework.org/t/downloading-blob-or-access-chrome-pdf-viewer/4121>\
**Category:** Browser\
**Created:** [30 June 2022 12:08 UTC](https://forum.robotframework.org/t/downloading-blob-or-access-chrome-pdf-viewer/4121 "2022-06-30T12:08:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomaspekarovic](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/tomaspekarovic/32/1368_2.png) [@tomaspekarovic](https://forum.robotframework.org/u/tomaspekarovic)\
**Post date:** [30 June 2022 12:08 UTC](https://forum.robotframework.org/t/downloading-blob-or-access-chrome-pdf-viewer/4121/1 "2022-06-30T12:08:29Z")

</div>

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){
  logger("Start")
  await page.click(element);
  const [popup] = await Promise.all([
    page.waitForEvent('download'),
    await page.click("xpath=//button[@ng-click='yes()']")
  ]);
  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://…’
