New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to make sure a tab in background will keep running? #169
Comments
Thanks for filing! Q: You're using headful Chrome, correct? If so, why not headless? Q: If you're using puppeteer, what led you to use I'm not aware of a way to completely coerce a headful tab to behave like it's the foreground tab, but maybe there are other workarounds for your use case. |
Why headful Chrome? Why Other ways to make tab behave like foreground tab: |
I'm not aware of any better ways than the flags you've documented and the autoplay audio and video hacks unfortunately :/ |
hmm.. that's not great. In my understanding it's done for performance reasons. So, I was really hoping that this would be just a flag. Is there some reason why it's not? Should I open a feature request on crbug? cc: @paulirish Are there any other methods that we might be missing here? |
patrick and i know pretty much the same amount on this topic :) but yeah i think a crbug makes sense if we can prove this is happening. a test page that prints out timer overage would help a lot. |
relevant blog post: https://meowni.ca/posts/metronomes/ & https://metronomes.glitch.me/ |
Thanks for the links @paulirish. As mentioned in #170 (comment), I am unable to reproduce the issue right now. Will update if I find something. |
I have updated a working issue which shows that this is an issue. |
Related: ChromeDevTools/devtools-protocol#89 I can also see from the POC that the mousemoves are being sent to the page but at a throttled rate. |
I have added an issue on crbug now: https://bugs.chromium.org/p/chromium/issues/detail?id=1004821 |
Related issue: puppeteer/puppeteer#3318 @patrickhulce I dig a bit deeper in this. I can do all keyboard events and even do I also looked into what is |
POC for the issue: https://gist.github.com/VikramTiwari/77d0b81e605b0af161e0021e130d34d3 As stated above: |
I think it might be totally related to puppeteer/CDP since I can click using cc: @mathiasbynens |
So, puppeteer/puppeteer#5201 on puppeteer details why click is not working. |
Hey @VikramTiwari, I'm really grateful to your efforts on this thread! I'm using So according to the above comments, looks like this issue is still not fully resolved, although you suggested, using the following code might be a solution, await page.evaluate(() => document.getElementById('xyz').click()); but as I tested, some button or elements cannot be clicked by this So I still wondered
|
Sorry for such a delayed response @ecolss.
Hope these answers are helpful. |
Scenario:
I am launching chrome with following flags:
And then utilizing puppeteer to do some operations in a tab in the background while I keep focus on a separate tab.
Expectation: The tasks should happen at normal pace in the background tab
Reality: The tasks in the background tab are throttled
Please let me know if there are other details that I can provide. Thanks!
The text was updated successfully, but these errors were encountered: