ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-WebDriver/WebDriver.pm
(Generate patch)

Comparing AnyEvent-WebDriver/WebDriver.pm (file contents):
Revision 1.57 by root, Fri Mar 27 19:11:30 2020 UTC vs.
Revision 1.58 by root, Fri Mar 27 23:55:14 2020 UTC

1105=item $wd->take_element_screenshot ($element) 1105=item $wd->take_element_screenshot ($element)
1106 1106
1107Similar to C<take_screenshot>, but only takes a screenshot of the bounding 1107Similar to C<take_screenshot>, but only takes a screenshot of the bounding
1108box of a single element. 1108box of a single element.
1109 1109
1110Note: The W3C WebDriver specification also mentions a "scroll" parameter, 1110Compatibility note: As of chrome version 80, I found that the screenshot
1111but it is impossible to pass parameters for this command, so it is 1111scaling is often wrong (the screenshot is much smaller than the element
1112czrrently left out. 1112normally displays) unless chrome runs in headless mode. The spec does
1113allow for any form of scaling, so this is not strictly a bug in chrome,
1114but of course it diminishes trhe screenshot functionality.
1113 1115
1114=cut 1116=cut
1115 1117
1116sub take_screenshot_ { 1118sub take_screenshot_ {
1117 my $cb = pop; push @_, sub { $cb->($_[0], _decode_base64 $_[1]) }; 1119 my $cb = pop; push @_, sub { $cb->($_[0], _decode_base64 $_[1]) };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines