Capture Screenshot when using Webdriver browser

I’m currently reimplementing my flows to use a headless browser using the chrome webdriver

Unfortunately I’m struggling to capture a screenshot of the webpages. The UiPath screenshot activity, as far I understand it, only captures the screen canvas so that’s no use.

Is there a way I can access TakesScreenshot from the webdriver itself? Not sure if that’s exposed.

Has anyone done this?

Hi! welcome back to community!

Have a view on this thread

Regards,
NaNi

Thanks, but Take Screenshot isn’t going to work if the browser is running headless (unless there’s an option I’m missing somewhere?)

Hi!

can you use attach window activity inside the attach window use take screenshot activity.

Regards,
NaNi

Unfortunately not - just tried that and got this message:

Attach Window: A browser started by WebDriver in headless mode does not support this kind of operation.

Bump. Has really nobody done this?

What’s the point of supporting webdriver if you can’t support basic functions like screenshot?