This repository has been archived by the owner on Nov 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 575
Implement an onConsoleMessage() event #206
Labels
Comments
Yes.
You can access anything you normally would be able to via script injected on the page, because that's what's being done here. The method you pass to |
Yes, I know. I think if there is a method to catch the log executed in the page. chromeless.evaluate(() => {
$("button").click();
console.info($("button"))
});
chromeless.onConsoleMessage=(msg) => {
console.log(msg);
};//a method to catch the log executed in the page. |
I see. Yes, that would be nice. I've wanted that too. |
adieuadieu
changed the title
Could console be effected in function 'evaluate() '
Implement an onConsole() event
Aug 12, 2017
I guess what you're looking for is access to Console.messageAdded? |
adieuadieu
changed the title
Implement an onConsole() event
Implement an onConsoleMessage() event
Aug 12, 2017
Actually |
Hi, is there a clean way to get the client (CDP) from chromeless instance? just wanna do like this... const chromeless = new Chromeless()
const client = ? // o.o?
const { Runtime } = client
Runtime.consoleAPICalled(({ type, args }) => {
console[type].apply(console, args.map(o => o.value))
}) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: