We have released a tool on Windows to take screenshots from the command line or to schedule screenshot automatically with browshot-cmd.exe
Download the archive browshot-cmd.zip. Unzip all the file in any directory.
Make sure Browhsot.dll and browshot-cmd.exe are in the same folder.
Open the command line on Windows (Command Prompt or cmd.exe). Go into the directory that contains browshot-cmd.exe. Run browshot-cmd.exe --help to get the full list of options:
C:\Users\Julien\Downloads\browshot-cmd>browshot-cmd.exe --help
Usage: browshot.exe: OPTIONS
Interact with the Browshot API.
https://browshot.com/api/documentation
Options:
-u, --url=URL the URL for the screenshot
-k, --key=KEY your API KEY
default =
-f, --file=FILENAME FILENAME to use for the screenshot images
default =
-i, --instance=INSTANCE_ID INSTANCE_ID to use
default = 65
-z, --size=SIZE the screenshot SIZE, 'page' or 'screen'
default = screen
-d, --delay=SECONDS number of SECONDS to wait after the page is
loaded
default = 5
--fd, --flash_delay=SECONDS
number of SECONDS to wait if Flash objects are
present
default = 5
-o, --format=FORMAT the image FORMAT of the screenshot, 'png' or
'jpeg'
default = png
-q, --quality=QUALITY JPEG image QUALITY of the screenshot
Optional, default = 90
-s, --shots=SHOTS the number of SHOTS of the same page
Optional, default = 1
--si, --shot_interval=SECONDS
the number of SECONDS between 2 screenshots of
the same page
Optional, default = 5
-c, --cache=SECONDS get a previous screenshots if done within
SECONDS
default = 8600
-w, --width=WIDTH thumbnail WIDTH
default = 0
-e, --height=HEIGHT thumbnail HEIGHT
default = 0
--sw, --screen_width=WIDTH
browser screen WIDTH
default = 0
--sh, --screen_height=HEIGHT
browser screen HEIGHT
default = 0
--referrer=REFERRER REFERRER Url
default =
--script=JAVASCRIPT JAVASCRIPT Url to inject in the page
default =
--post_data=POST DATA POST DATA for a POST request
default =
-h, --help, -? show the list of options
The options match the different options to create screenshots through the Browshot API.
To take a screenshot of https://www.google.com/ on the premium instance 58, use this command:
C:\Users\Julien\Downloads\browshot-cmd>browshot-cmd.exe --url=https://www.google.com/ --instance=58 --size=page --screen_width=1280 --screen_height=1024 --width=640 --key=my_api_key
Screenshot for https://www.google.com - attempt: 1
https://api.browshot.com/api/v1/screenshot/create?&screen_width=1280&height=0&delay=5&referrer=&post_data=&width=640&size=page&shot_interval=5&quality=90&file=&screen_height=1024&format=png&url=https:%2f%2fwww.google.com&shots=1&script=&cache=8600&instance_id=58&key=my_api_key
ID: 42250735
Status: in_queue
Waiting 20 seconds...
https://api.browshot.com/api/v1/screenshot/info?&id=42250735&key=my_api_key
Screenshot ID: 42250735
https://api.browshot.com/api/v1/screenshot/thumbnail?&quality=90&referrer=&size=page&width=640&id=42250735&format=png&instance_id=58&script=&file=&shots=1&key=my_api_key&shot_interval=5&post_data=&shot=1&cache=8600&screen_width=1280&height=0&delay=5&screen_height=1024
Screenshot saved to 42250735.png
Instead of specifying the same arguments every time you take a screenshot (key, instance ID, screen_width, etc.), you can save your default parameter in the file browshot-cmd.exe.config.
After you update browshot-cmd.exe.config, browshot-cmd.exe --help will display the default values saved in the file.
You can use browshot-cmd.exe with the Windows task scheduler to take screenshots automatically.
browshot-schedule.xml is an example of a task. You need to edit it and change the folder and argument at the end of the file. Then, open Windows Task Scheduler and import browshot-schedule.xml. You can change additional settings such as the frequency and the start time of the task.
no credit card required
Browshot is a web service to create real time web screenshots in a multitude of virtual devices, including mobile devices like the iPhone 3 & 4, iPad, Android Nexus, etc.
You can use the web dashboard, or our full-featured API.
Real time screenshots
15+ mobile devices: iPhone, iPad, Android, etc.
30+ desktop resolutions
Fast and reliable
Thumbnails of any size, any ratio
Full API, open-source libraries