Closed xeust closed 1 year ago
Thanks,
I made a mistake, the upload
function works async
, it is necessary to wait for the completion of loading with await
, otherwise the operation is canceled when the function ends.
await page.goto("https://deta.space")
// Capture a screenshot and get page title.
const ss = await page.screenshot()
const title = await page.title()
// Let's upload the screenshot to Drive.
- upload("ss.png", ss)
+ await upload("ss.png", ss)
// Return the page title as a log record.
return `Page title: ${title}`
@cemalgnlts this is super cool!
In the example snippet, there is an upload to Drive feature:
It runs successfully, but I can't seem to find the image in Drive. I assume this isn't yet implemented?