Skip to content


Subversion checkout URL

You can clone with
Download ZIP


How to just capture screenshot of the window? #14

millisami opened this Issue · 2 comments

4 participants


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 -, you can pass id/name to take_screenshot method and put it instead of root. (See -


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.