Right now, headless.take_screenshot('./somefile.jpg') works great!
But the saved file has all the Menubar, address bar, scrollbar attached.
Is there any other function call or params that can be passed to just capture the content window only without the Menubars,status bar, scroll bar, ..etc.??
Currently there is no way to do it via headless. Maybe you can figure it out yourself if you definitely need it. Headless uses import utility from imagemagick and it can accept window id or name (see - man - http://www.imagemagick.org/script/command-line-options.php?ImageMagick=op7slcr8l6l27lekiqiif8e6t2#write), you can pass id/name to take_screenshot method and put it instead of root. (See - https://github.com/leonid-shevtsov/headless/blob/master/lib/headless.rb#L118)
You could also enable to browser to full screen:
driver.find_element(:tag_name => 'html').send_keys(Selenium::WebDriver::Keys[:f11]) #full screen cmd for Firefox