src/vs/platform/driver/electron-main/driver.ts/Driver/capturePage
class Driver:	async capturePage(windowId: number): Promise<string> {
		await this.whenUnfrozen(windowId);

		const window = this.windowsMainService.getWindowById(windowId);
		if (!window?.win) {
			throw new Error('Invalid window');
		}
		const webContents = window.win.webContents;
		const image = await webContents.capturePage();
		return image.toPNG().toString('base64');
	}