selenium
selenium copied to clipboard
[🐛 Bug]: Can't capture full Object structures in console log
What happened?
I'm trying to get the full log messages in console (Chrome) but the log captured is only "Object" when in real browser we can expand object structures. Is there any possibility to capture the full object values?
How can we reproduce the issue?
- Add logger to the webdriver instance to print log message in Terminal
const logs: logging.Entry[] = await driver.manage().logs().get(logging.Type.BROWSER);
console.log(logs);
- Create a webpage than print an object in the browser's console
<script>console.warn(JSON.parse(`{"key":"value"}`));</script>
-
Navigate to that webpage
-
Check terminal messages
Relevant log output
[WARNING] [2024-05-27T08:20:34.139Z] http://localhost:8000/console.html 6:16 Object
Operating System
MacOS X
Selenium version
Javascript 4.7.1
What are the browser(s) and version(s) where you see this issue?
Chrome 125
What are the browser driver(s) and version(s) where you see this issue?
Chromedriver 125
Are you using Selenium Grid?
No