Implement Runtime.consoleAPICalled
Categories
(Remote Protocol :: CDP, enhancement, P1)
Tracking
(firefox85 fixed)
Tracking | Status | |
---|---|---|
firefox85 | --- | fixed |
People
(Reporter: ochameau, Assigned: whimboo)
References
Details
(Whiteboard: [puppeteer-beta2-mvp])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
This is being used by the test framework of gutenberg to assert this isn't unexpected console calls.
Unfortunately, this is also making many tests to fail as I think we are getting unexpected console calls due to difference in Firefox being different than Chrome. We should most likely ignore firefox specifics from gutenberg tests.
Comment 1•6 years ago
|
||
If Gutenberg is using that to making some decision without looking
at the contents of those console calls, what you say makes sense.
Reporter | ||
Comment 2•6 years ago
|
||
Here is the code, there is only a few cases being ignored:
https://github.com/WordPress/gutenberg/blob/master/packages/e2e-tests/config/setup-test-framework.js#L107-L159
But I don't recall if that makes tests to fail.
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
In Puppeteer this finally ends-up as Events.Page.Console
, and gets emitted in _addConsoleMessage
:
https://github.com/GoogleChrome/puppeteer/blob/master/lib/Page.js#L610-L630
I cannot find anything related to Page.Console
in the Gutenberg e2e tests. As such this shouldn't block the alpha release.
Assignee | ||
Comment 4•5 years ago
|
||
Actually I missed comment 2 from above, and I should not have searched for Page.Console
only. So Alexandre's point is still valid, and as such might have to block the alpha release.
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
Note that the code Alexandre pointed out in comment 2 uses specific error messages like net::ERR_UNKNOWN_URL_SCHEME
only sent by Chrome. With Maja's navigation patch on bug 1599257, we will also send out error messages soon, but the Gutenberg harness clearly would need an update.
Updated•5 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
This is actually blocking the opt-in for WebDriver clients with Selenium 4. As such I'm going to work on it now.
Assignee | ||
Comment 7•4 years ago
|
||
Message as returned by Chrome look like:
>>> {
message: {
source: 'console-api',
level: 'info',
text: 'foo',
url: '',
line: 1,
column: 9
}
}
{
message: {
source: 'console-api',
level: 'log',
text: 'foo',
url: '',
line: 1,
column: 9
}
}
Assignee | ||
Comment 8•4 years ago
|
||
Also note that when the API has already been used before the Runtime
domain was enabled it sends past events too. I assume that we can query for those via the internal Console API. Maybe this should be a follow-up.
Assignee | ||
Comment 9•4 years ago
|
||
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Updated•1 years ago
|
Description
•