ChatGPT:
let screenshot = tab.capture_screenshot(ScreenshotFormat::PNG, None, true).await?;
let html = String::from_utf8(screenshot).unwrap();
>[...] Once the page is fully loaded, the function captures a screenshot of the page using tab.capture_screenshot(), converts the screenshot to a string using String::from_utf8(), and then returns the string as the HTML content of the page.
Of course, it admits to the mistake (sort of, it still does not get):
> You are correct, taking a screenshot and converting it to text may not always be the best approach to extract the HTML content from a webpage.
It's hilarious.