New issue
Advanced search Search tips

Issue 770387 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Feature



Sign in to add a comment

Support viewing js console output from shell in snap_page script

Project Member Reported by wkorman@chromium.org, Sep 29 2017

Issue description

I'd like to add console.log (or similar, happy to use a logger object) instrumentation to some of the snap_page logic, for example popup.js, and be able to view that as output in the command-line shell.

I tried opening the inspector while the browser was up, but doing so seems to break the python devtools api inspector backend connection.

I can open the browser directly and debug but it'd be nice to test end to end since we'll be putting some logic in the wrapper script to grab the images outputted from the snap JS.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/catapult/+/4165563dbd1994aa07f8d879e7dbaf5df442189d

commit 4165563dbd1994aa07f8d879e7dbaf5df442189d
Author: Nghia Nguyen <nednguyen@google.com>
Date: Fri Oct 06 12:42:03 2017

Allow snap_page script to output console to log file

Bug:  chromium:770387 

To try this out:
./telemetry/bin/snap_page --browser=system --url=https://www.amazon.com/

Stderr will show s.t like:
"Chrome log file will be saved in /temp/path/to/chrome.log"

Then one can run "tail -f /temp/path/to/chrome.log" to see the console log in
real time.

Change-Id: I60cb9a9a702c69ba145dc781cebc07b47870eff6
Reviewed-on: https://chromium-review.googlesource.com/703334
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Reviewed-by: Walter Korman <wkorman@chromium.org>

[modify] https://crrev.com/4165563dbd1994aa07f8d879e7dbaf5df442189d/telemetry/telemetry/internal/snap_page_util.py
[modify] https://crrev.com/4165563dbd1994aa07f8d879e7dbaf5df442189d/telemetry/telemetry/internal/snap_page_util_unittest.py
[modify] https://crrev.com/4165563dbd1994aa07f8d879e7dbaf5df442189d/telemetry/bin/snap_page

Status: Fixed (was: Assigned)
Components: Test>Telemetry
Components: -Speed>Telemetry

Sign in to add a comment