Page 1 of 1

Capture full webpage as png with inbuild chrome dev tools

Posted: 19 Jan 2018, 06:59
by noname
Image

Maybe this is common knowledge......but i did not know you could use "chrome development tools" to capture a whole webpage as png .
Unfortunately i do not see a method to link it to a shortcut.

Re: Capture full webpage as png with inbuild chrome dev tools

Posted: 20 Jan 2018, 14:48
by Blackholyman

Re: Capture full webpage as png with inbuild chrome dev tools

Posted: 21 Jan 2018, 03:24
by noname
Thank you for the link ,what a coincidence posted on 16 jan :) Unfortunately i see the limitation it has to have chrome running in debug mode but the access to dev tools from within ahk is something to play with !

This is offtopic Blackholyman but if you have time to take a look at https://autohotkey.com/boards/viewtopic.php?f=5&t=42753 ? The solution of "Guest" works but is there no way of avoiding the namespace problem without "setting" one and have to use it in the following queries ?Thanks :)

Re: Capture full webpage as png with inbuild chrome dev tools

Posted: 21 Jan 2018, 05:21
by BoBo

Re: Capture full webpage as png with inbuild chrome dev tools

Posted: 21 Jan 2018, 06:03
by Guest
You can do the same and more with http://phantomjs.org/
PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.
Screencapture example http://phantomjs.org/screen-capture.html

Re: Capture full webpage as png with inbuild chrome dev tools

Posted: 21 Jan 2018, 06:30
by Xtra

Code: Select all

#NoEnv
SetKeyDelay, 50, 50

#IfWinActive, ahk_class Chrome_WidgetWin_1
$1::
    Send, {Ctrl Down}{Shift Down}i{Shift Up}{Ctrl Up}
    Sleep 100
    Send, {Ctrl Down}{Shift Down}p{Shift Up}{Ctrl Up}
    Sleep 500
    SendInput, screenshot
    Sleep 250
    Send, {Enter}
    Sleep 2000    ; Sleep longer to allow time for image to be created before closing dev tools
    Send, {Ctrl Down}{Shift Down}i{Shift Up}{Ctrl Up}
return
#If

Re: Capture full webpage as png with inbuild chrome dev tools

Posted: 21 Jan 2018, 14:49
by noname
Hi BoBo ,
You traveled to the outer regions of the internet again :)

Guest,
I will have to spend a few weekends with phantomjs i guess.....there is indeed a lot more in it.

Xtra ,
I am not fond of sending keystrokes but your code works very well ,i only had to increase the sleep values but it proved to be very easy in use.