Course lesson 33 · Building AI Workflows

Taking Screenshot in Browser Rendering

One study unit · Read, recall, then practice · Original video 00:03:29

This update adds screenshots to the rendering evidence so the instructor can inspect what the remote browser actually saw. The browser helper returns an encoded screenshot, and the R2 backup step converts it into image bytes and stores it beside the HTML and text. The resulting image shows an error page, explaining why the AI could not infer the product’s availability from the collected content.

Primary source: course video 33 · Supplied English subtitles · 00:03:29.

Understand the idea

What the course does

  1. Take a screenshot after the page-loading work in the browser helper.
  2. Return the screenshot as an encoded data URL alongside the collected page data.
  3. Extend the R2 backup step with a screenshot-specific path.
  4. Extract the encoded image portion, convert it into bytes, and write it to R2.
  5. Run a workflow and open the saved screenshot to inspect the unexpected AliExpress page.

Watch for

Follow the final workflow correction in lesson 34 when combining these steps.

Recall before revealing

What did the screenshot explain that the unknown AI status could not explain by itself?

Reveal the explanation

It showed that the rendering session saw an error page, so the expected product evidence was absent before the model was called.

Try it

For an unexpected classification, write the evidence you would inspect in order: rendered screenshot, collected text, response status, prompt, and model output.

Check your result

Your investigation can identify whether the problem began during collection or interpretation instead of treating every unknown status as a model defect.

Practice prompts and answer checks are added teaching material. Answer from memory first, then compare and explain any difference.

Rewatch only what you need

Open this lesson in your original course library and seek to the times below. Videos are not hosted on this site.

Companion primary documentation: Workflows Workers API. For recorded API names, commands, limits, and prices, check the version you use.

← Previous   Next →