Skip to content

Conversation

@lslezak
Copy link
Contributor

@lslezak lslezak commented Apr 25, 2025

Problem

  • The Firefox devtools are displayed at the bottom of the page
  • If we need to take a screenshot of the browser console in openQA then some important errors might be hidden (need scrolling to see them)

The original state after pressing F12:
agama-browser-devtools

Solution

  • Open devtools in a separate window
  • By default display the console tab
  • Display timestamps in the console, that can help to match the browser log with the backend log

The new state after pressing F12:
agama-browser-devtools-fullscreen

@dgdavid
Copy link
Contributor

dgdavid commented Apr 25, 2025

  • If we need to take a screenshot of the browser console in openQA then some important errors might be hidden (need scrolling to see them)

Remember that scroll might appear at any time, any resolution 😉 In this case it depends of how long the trace is. Of course, the situation is better now and there are less chances of missing something.

So, despite this is a nice job for easing testing/debugging process I still betting for an endpoint in the server for recording the console messages, when possible.

@dgdavid
Copy link
Contributor

dgdavid commented Apr 25, 2025

So, despite this is a nice job for easing testing/debugging process I still betting for an endpoint in the server for recording the console messages, when possible.

But don't get me wrong. Nice work, thanks!

@lslezak
Copy link
Contributor Author

lslezak commented Apr 25, 2025

The problem with console messages is that you cannot reliably catch all messages, you can catch console.log() calls from JavaScript, but you cannot catch the errors reported by the browser itself, like that "Too many calls to Location or History APIs within a short timeframe" error. 😟

So taking the console screenshot will be still important feature.

// show the console tab instead of the page inspector after pressing F12
user_pref("devtools.toolbox.selectedTool", "console");
// show time stamps in the console
user_pref("devtools.webconsole.timestampMessages", true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For saving more space, I guess you could even show only errors by disabling others

devtools.webconsole.filter.info	        false	
devtools.webconsole.filter.warn       false   

Copy link
Contributor Author

@lslezak lslezak Apr 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use logging at very few places in the web UI, most of them are errors or warnings already. We can change the filtering later when really needed, for now I'd keep it as it is.

@lslezak lslezak merged commit ffe2fc9 into master Apr 25, 2025
12 checks passed
@lslezak lslezak deleted the fullscreen_console branch April 25, 2025 16:29
@imobachgs imobachgs mentioned this pull request May 26, 2025
imobachgs added a commit that referenced this pull request May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants