Bug 174615 - WebDriver: implement screen capture commands
Summary: WebDriver: implement screen capture commands
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: gtk-webdriver
  Show dependency treegraph
 
Reported: 2017-07-18 00:31 PDT by Carlos Garcia Campos
Modified: 2017-08-28 06:56 PDT (History)
4 users (show)

See Also:


Attachments
Patch (29.11 KB, patch)
2017-08-17 06:02 PDT, Carlos Garcia Campos
bburg: review+
Details | Formatted Diff | Diff
Patch for landing (29.09 KB, patch)
2017-08-28 05:09 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Patch for landing (29.09 KB, patch)
2017-08-28 05:33 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-07-18 00:31:04 PDT
https://www.w3.org/TR/webdriver/#screen-capture
Comment 1 Carlos Garcia Campos 2017-08-17 06:02:40 PDT
Created attachment 318355 [details]
Patch
Comment 2 Carlos Garcia Campos 2017-08-17 06:05:42 PDT
hmm, it doesn't apply because it depends on patch attached to bug #175665. Maybe I can merge both patches/bugs since I ended up rewriting the takeScreenshot method.
Comment 3 BJ Burg 2017-08-18 12:19:42 PDT
Comment on attachment 318355 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=318355&action=review

r=me

Please re-run through EWS.

> Source/WebKit/ChangeLog:16
> +        checkjed and passed to the web process.

Nit: checked

> Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:691
>      RefPtr<WebImage> image = page->scaledSnapshotWithOptions(snapshotRect, 1, SnapshotOptionsShareable);

We received a bug the other day that the scale factor should be inherited from the device. Right now, retina screenshots are at @1x and look blurry. But that's a separate bug.
Comment 4 Carlos Garcia Campos 2017-08-28 05:09:29 PDT
Created attachment 319175 [details]
Patch for landing
Comment 5 Carlos Garcia Campos 2017-08-28 05:33:18 PDT
Created attachment 319176 [details]
Patch for landing
Comment 6 Build Bot 2017-08-28 05:36:13 PDT
Attachment 319176 [details] did not pass style-queue:


ERROR: Source/WebDriver/Session.h:116:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebDriver/WebDriverService.cpp:1514:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebDriver/WebDriverService.cpp:1531:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebDriver/WebDriverService.h:112:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebDriver/WebDriverService.h:113:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebDriver/Session.cpp:2000:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 6 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Carlos Garcia Campos 2017-08-28 06:55:24 PDT
Committed r221255: <http://trac.webkit.org/changeset/221255>
Comment 8 Radar WebKit Bug Importer 2017-08-28 06:56:01 PDT
<rdar://problem/34109485>