Comments (1)
Same issue here — tried playing around with the enableLog
and enableRuntime
methods but no luck — other events come through fine.
It isn't much of a solution, but in case it helps I'm using this to work around the issue:
After loading the page:
let console_override = vec![
"function() {",
"const c = console; c.events = [];",
"let l = [c.log, c.warn, c.error, c.debug].map(e => e.bind(c));",
"let p = (m, a) => c.events.push(`${m}: ${Array.from(a).join(' ')}`)",
"c.log = function(){ l[0].apply(c, arguments); p('LOG', arguments); }",
"c.warn = function(){ l[1].apply(c, arguments); p('WRN', arguments); }",
"c.error = function(){ l[2].apply(c, arguments); p('ERR', arguments); }",
"c.debug = function(){ l[3].apply(c, arguments); p('DBG', arguments); }",
"}",
]
.join("\n");
let _ = page.evaluate_function(console_override).await?;
Some time later:
let logs = page.evaluate_function("() => console.events").await?.into_value::<Vec<String>>();
Where logs comes out as ["LOG: Some log", "ERROR: Some console error"]
I really just need to know if things were logged during a test, so this is enough information for me. Having this fixed would be great, however, as the CDP event contains a lot more than just the text :)
from chromiumoxide.
Related Issues (20)
- Is there an example of Network Request Interception? HOT 2
- Is there a way to force the browser to close in case the rust process is closed?
- How to wait for a specific dynamically loaded element to load?
- `<iframe>` elements stop page from loading HOT 28
- How to update .pdl files
- Critical Deserialization issue HOT 18
- CommandFuture will be polled forever if Page is closed.
- Unable to configure timeout on commands HOT 3
- Times Out On Any Website Using <browser>.new_page() HOT 9
- How'd i use proxy while taking screenshots HOT 1
- proxy arg not working
- Use new headless mode. HOT 1
- `page.wait_for_navigation().await?;` seems to return before all the pages assets (images,js,css) are fully loaded HOT 4
- Error `unknown flag 'disable-background-networking'` while using with Chromium HOT 1
- Page.goto hangs on some websites while browser.new_page works
- Is there a way to get access to the `redirect_chain` ?
- Error: ChromeMessage("Node is either not visible or not an HTMLElement") on a basic example HOT 2
- Running an init script
- Random crashes when not using headless mode
- Is there a way to get the raw bytes of a response?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chromiumoxide.