I use the Chrome developer console a lot while I'm testing websites, and one thing I pass a bunch is specific ID numbers that I would like to jot down.
Right now I'm looking into easy ways to be able to access these ID numbers after I've already passed them. I know I can make the log persist after navigating to other windows, but that keeps all of the data and I don't want the rest of the stuff.
I've also looked into saving the console log and using console.log(document.getElementById("").value); to put the value into the console, but then I found out that the log is reset after every new session.
I would like to know where to get started for something like this. Is there some way to write the values to a file through a Chrome extension? Alternatively, is there a console setting or a function I could use to keep all of the values in the console so I could copy them all at once without having all of the other console text in there?
Thanks
Edit- More Information:
I'm testing from the user side, and using both commands manually entered into the Chrome console and a locally-hosted Chrome Extension for filling out select pages by editing the values of inputs.
The exact scenario is that I go to a page where I enter address information, and at the top of the page is a number with an element ID, let's just say userId. I click my Chrome Extension and it enters in all the address information and progresses to the next page. I also have a saved script for JavaScript that I can copy and paste into the console to fill out all the information.
With this much control, I want to be able to save the userId value, at the very least to an array in the console that I can paste to get all of the userId's that I've passed before.