I work as a technical support and we heavily rely with console and HAR (network) logs to resolve issues. There are some issue that cannot be replicated and we need to record it before it happened but there is no way to now when it will happen. Keeping chrome devtool running for a day is not advisable for it will create a huge file and there is a tendency that it will crash.
Provide me some idea on how I'm going to do this:
- Gather console log and HAR (network) log continously until the user stop it.
- Save the files locally by setting a file limit (e.g. 10 MB)
- This could be distributed to multiple clients to be run on their local machine.
I want to make this from catch, all I ask is an idea and where should I start. Based on my research, I could use python with playwright or selenium.
If you can direct me to a site where I can do research, please do so. Not asking for any code. Just want to know how can I make this possible.
Thanks in advance.
I used chat GPT but it always give me an error whenever I try to run the code.
*** Disclaimer: Posted by HttpWatch Developer ***
If you're running on Windows you could used our HttpWatch product to record logs files and split them based on a time interval. The files can be saved in HAR or the proprietary HWL format.
You can also automate HttpWatch using Python if you want to control the recording of log files while driving the browser with a framework like Selenium.
Here's some more information about these features:
https://help.httpwatch.com/automatic_recording.html https://www.httpwatch.com/features/automatedtesting.aspx https://apihelp.httpwatch.com/