Is there a way to know the total time one spends on a page opened in a browser using a python script? For example if one uses gmail, and is currently using it (i.e the page is non idle) can we know the total time for which the page was active? Further explaining what I intend to do:
- By active means I am actually using the page, be it reading it, doing some typing or doing some mouse work.
- It would be great if there would somehow be a way to exclude the time spent in breaks, perhaps introduce some error? I am not sure whether javascript would be apt for it, and am open to suggestions!