Capture full webpage as png with inbuild chrome dev tools

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Capture full webpage as png with inbuild chrome dev tools

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

Post by noname » 21 Jan 2018, 14:49

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.

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

Post by Xtra » 21 Jan 2018, 06:30

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

Post by Guest » 21 Jan 2018, 06:03

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

Post by BoBo » 21 Jan 2018, 05:21

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

Post by noname » 21 Jan 2018, 03:24

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

Post by Blackholyman » 20 Jan 2018, 14:48

Capture full webpage as png with inbuild chrome dev tools

Post by noname » 19 Jan 2018, 06:59

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.

Top