Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Download screenshot from website

by jeevansai (Initiate)
on Sep 20, 2017 at 14:30 UTC ( #1199745=perlquestion: print w/replies, xml ) Need Help??
jeevansai has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to download screenshots of different graphs present on some websites by simply clicking on the graph which is inside a tabbed pane.Is there any way i can achieve this,i tried taking screenshot using phantomjs but i do not have element selector.

Replies are listed 'Best First'.
Re: Download screenshot from website
by Corion (Pope) on Sep 21, 2017 at 06:49 UTC
Re: Download screenshot from website
by 1nickt (Prior) on Sep 20, 2017 at 20:15 UTC

    Hi, I'm not aware of any spidering technique that will provide you with a screenshot just by clicking on an image.

    You can certainly get a screenshot using most solutions, you might need to scroll to the image/resource then take the screen shot. As others have said this is really a matter for whatever you use to control your browser. You may be using Perl to do this, for example I use Selenium::Remote::Driver for this with headless Firefox, eventually taking the screenshot with:

    $robot->capture_screenshot('/path/to/file.png');
    But you are really asking about the Selenium part of that.


    The way forward always starts with a minimal test.
Re: Download screenshot from website
by LanX (Bishop) on Sep 20, 2017 at 14:33 UTC
    > by simply clicking on the graph which is inside a tabbed pane

    I think at this point it's not a Perl question anymore.

    Try Javascript here.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

      I was trying to do it in perl as i was not able to in javascript.
        PhantomJS is a headless browser, I have trouble imagining what you mean with "clicking on the graph" in combination with Perl and no browser window.

        Sounds like you want a real browser with a "download on click" add-on probably combined with an automation add-on like Selenium IDE or iMacros to navigate the pages. (which is almost totally off topic here)

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Je suis Charlie!

        Please show us the Perl code you've tried. We can't offer much help without it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1199745]
Approved by LanX
help
Chatterbox?
[Discipulus]: morning marto!! choroba i know where you were last night; an exclusive golf club.. where me too i lurked ;=)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2017-10-20 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (260 votes). Check out past polls.

    Notices?