in reply to Compare method with Selenium

$white should contain an object (or a package name) in order to have methods run on itself. Selenium::Screenshot->new returns the object you want, but you called `->save` on it, which returned only the file name. You can't chain the constructor with the save method.

my $white = 'Selenium::Screenshot'->new( png => $driver->screenshot, exclude => [{ size => { width => 10, height => 10 }, location => { x => 5, y => 5 }, }]); $white->save( file => "snapScreenshot" );

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Compare method with Selenium
by Chaoui05 (Scribe) on May 25, 2016 at 08:16 UTC
    Thanks Choroba ! It works right now . But i have another issue. Why i could not have a black out in my page. It should work :
    $elem = $driver->find_element('applgs','id' ); my $white = 'Selenium::Screenshot'->new( png => $driver->screenshot, exclude => [{ size => { width => 10, height => 10 }, # siz +e => $elem->get_size, location => { x => 5, y => 5 }, #location => $el +em->get_element_location, }] );