in reply to Re: Selenium Screenshot
in thread Selenium Screenshot

I have another question if you would like to take 2 mins. I have this following method :
$elem = $driver->find_element('app-lgs','id' ); Selenium::Screenshot->new( png => $driver->screenshot, exclude => [{ size => $elem->get_size, location => $elem->get_element_location, }] )->save( file => "screen.png" );
But there is no example added to describe how to use it. I tried code below but it doesn't work:
Selenium::Screenshot->new( png => $driver->screenshot, exclude => [{ size => { width => 10, height => 10 } location => { x => 5, y => 5 }, }]
Have you got an example to purpose me ? Thanks again !

Replies are listed 'Best First'.
Re^3: Selenium Screenshot
by Corion (Patriarch) on May 24, 2016 at 13:18 UTC

    The documentation of Selenium::Screenshot discusses what the parameters are for. Which parts of the documentation are unclear for you?

      Hi Corion ! Documentation is clear. I would like ,in my case, to exclude a part of my website's page. And get and return it in a screenshot . I effectively have screenshot but there is no black out area inside. I don't know whether I am making myself clear. In any case, Thanks