How do I find the windowid of Google Chrome to pass to screencapture -l I'd like to use screencapture -l to do automated screen captures of Google Chrome. This requires knowing the windowid of the Google Chrome process that's running.

For apps that support Applescript, this question has the answer. But that solution doesn't work for apps that aren't scriptable, like Google Chrome.

Is there any way to retrieve the windowid from a running Google Chrome process from a Python script? I know that the Quartz Debug app can do it, but that's a GUI app, so it can't be invoked via script.
You can do that with GrabFS, a screenshot filesystem for OS X. (Download at the bottom of the page. Works fine for me on 10.8.2 with OSXFUSE) It gives you the textures of any processes windows as files which you can simply copy. To update the screenshot, copy again.

Looks like this (converted from TIFF to PNG to save space.): 
You'll likely need to do a little shell scripting to automate this, but that will be easy.