But i get after this ouput in my Shell:$driver->set_window_size(320, 480); $elem = $driver->find_element('applgs','id' ); my $white = Selenium::Screenshot->new( png => $driver->screenshot, exclude => [{ size => { width => 10, height => 10 }, location => { x => 5, y => 5 }, }] )->save( file => "snapScreenshot" ); $driver->execute_script('document.getElementsByTagName("body")[0]. +style.backgroundColor = "red"'); my $blue = Selenium::Screenshot->new(png => $driver->screenshot)-> +save( file => "snapScreenshot1" ); unless ($white->compare($blue)) { my $diff_file = $white->difference($blue); print 'The images differ; see ' . $diff_file . ' for details'; }
I have my 2 screenshots and one of them have got effectively its body in red. Somenone can help ? Many Thanks !!not ok 22 - A_test died (Can't locate object method "compare" via pack +age "D:/t/gui-tests/tests/screenshots/snapScreenshot-firefox.png " (perhaps you forgot to load "D:/t/gui-tests/tests/screenshots/snapSc +reenshot-firefox.png"?) at MyTestingSuite.pm line 260.)
In reply to Compare method with Selenium by Chaoui05
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |