Closed Bug 709460 Opened 14 years ago Closed 13 years ago

GCLI needs a screenshot command

Categories

(DevTools :: Console, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 15

People

(Reporter: jwalker, Assigned: vporof)

References

Details

(Whiteboard: [fixed-in-fx-team])

Attachments

(1 file, 2 obsolete files)

i.e. > screenshot foo.png Saved screenshot of current page to 'downloads/foo.png'
This needs to take into account bug 664693 comment 10 (and the few comments prior to that).
Would it be possible to also add support for: * screenshots copied directly to clipboard, rather than saved on disk; * screenshots of the viewport/entire window; and * screenshots of a particular area/element. The last one could encapsulate the second (screenshot --elem body). I'm not sure of the syntax for it, though. Perhaps "screenshot --elem <selector>".
Blocks: GCLI-12
No longer blocks: GCLI-FUTURE
Bug triage, filter on PEGASUS.
Target Milestone: --- → Firefox 12
Bug triage, filter on PEGASUS.
Priority: -- → P2
No longer blocks: GCLI-12
Attached patch upload 1 (obsolete) — Splinter Review
Basic implementation. No tests, l10n incomplete, errors in getting default download directory.
Assignee: nobody → jwalker
Status: NEW → ASSIGNED
Target Milestone: Firefox 12 → Firefox 13
Attached patch upload 2 (obsolete) — Splinter Review
Basically working. Just does current window, and only to a file right now. Enhancements welcome.
Attachment #590679 - Attachment is obsolete: true
Target Milestone: Firefox 13 → Firefox 14
Can I take this?
(In reply to Victor Porof from comment #10) > Can I take this? You're welcome to
Just checked and that's the latest version. It works OK, but can only screenshot the visible screen
Cool, I'll play with it a bit.
Assignee: jwalker → vporof
GCLI Triage.
Target Milestone: Firefox 14 → Firefox 15
Blocks: 745773
No longer blocks: 745773
Attached patch v3Splinter Review
Now able to screenshot the entire webpage view bounds or just a single node identified by a css selector.
Attachment #593142 - Attachment is obsolete: true
Attachment #626805 - Flags: review?(jwalker)
Comment on attachment 626805 [details] [diff] [review] v3 Review of attachment 626805 [details] [diff] [review]: ----------------------------------------------------------------- Thanks! ::: browser/devtools/commandline/GcliCommands.jsm @@ +195,5 @@ > + > + let source = ioService.newURI(data, "UTF8", null); > + persist.saveURI(source, null, null, null, null, file); > + > + return "Saved to " + filename; We're planning on adding a green tick-mark to indicate that the command executed correctly, and I'm expecting that the user will know the filename, so I think we can just return here. In the future, I've been mulling over the idea that we should have an implicit --verbose flag for all commands which we could turn on/off globally or on a case by case basis.
Attachment #626805 - Flags: review?(jwalker) → review+
(In reply to Joe Walker from comment #16) > Comment on attachment 626805 [details] [diff] [review] > v3 > > Review of attachment 626805 [details] [diff] [review]: > ----------------------------------------------------------------- > > Thanks! > > ::: browser/devtools/commandline/GcliCommands.jsm > @@ +195,5 @@ > > + > > + let source = ioService.newURI(data, "UTF8", null); > > + persist.saveURI(source, null, null, null, null, file); > > + > > + return "Saved to " + filename; > > We're planning on adding a green tick-mark to indicate that the command > executed correctly, and I'm expecting that the user will know the filename, > so I think we can just return here. > I'm not entirely sure that the user will know the filename right from the start. First time I tried a screenshot and didn't enter a fullpath, I almost got confused on whether the image will be saved in my downloads folder, or on my desktop (like os x does). Maybe we should keep it?
(In reply to Victor Porof from comment #17) > ... > > We're planning on adding a green tick-mark to indicate that the command > > executed correctly, and I'm expecting that the user will know the filename, > > so I think we can just return here. > > > > I'm not entirely sure that the user will know the filename right from the > start. First time I tried a screenshot and didn't enter a fullpath, I almost > got confused on whether the image will be saved in my downloads folder, or > on my desktop (like os x does). > > Maybe we should keep it? Ok, you sold me. Thanks.
Whiteboard: [fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Blocks: GCLICMD
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: