Is it possible to interact with the Firefox console when starting Firefox in headless mode?
Alternatively, is there a way to programmatically access the console in scripts?
My attempts so far:
I have been experimenting with the Javascript bindings to Selenium without success. Starting Firefox with the -devtools option from Selenium opens the dev tools, but I am unable to switch to the actual console or interact with the open devtools window using my .js script.
Edit
Despite trying various methods, such as sending CTRL+SHIFT+k to the body tag of google.com using Selenium, the console does not open as expected.
// code example here
Although no errors are returned and the page loads successfully, the console remains inaccessible.
Sending other key combinations works fine, indicating that the issue lies specifically with CTRL+SHIFT+k.
2nd edit:
Upon further exploration, a solution using Python instead of node has proven successful in accessing the Firefox console as intended.