It would be great to be able to copy text that appears in an alert box

I would like to be able to copy text that appears in an alert box. Many times on other browsers I’ve needed to copy some text in an alert box so I can do a web search on it.
More recently I’ve found a handy bookmarklet that generates HTML for me to copy and paste into a blog post / website. It’s displayed in an alert box and of course, in Brave, I can’t copy it!
Thanks in advance!

What type of alert box are you referring to?