Being able to change `document.visibilityState` (and consequently `document.hidden`) would be nice: - to test what some code does when hidden, prerender or visible - to test `visibilitychange` events and how code behave w.r.t. those properties
Activity
kapouer commentedon Mar 19, 2020
It should work with
Object.defineProperty(document, 'visibilityState', {get() { return "prerender";}})i don't know why i opened that issue.
Closing.
abhayp5 commentedon Jun 11, 2020
Jérémy Lal (@kapouer) can you please put the snap of the code where you implemented this. Need to do same.
kapouer commentedon Jun 11, 2020
abhayp5 https://github.com/kapouer/express-dom/blob/ef720a5b84e834ff951b9241788b63285c00e59b/lib/plugins.js#L98-L105
but there are tons of examples like that
abhayp5 commentedon Jun 12, 2020
thank you it really helped. able to achieve using page.evaluateHandle() function.
nowayX commentedon Oct 8, 2020
Can you tell me how you changed the visibilityState with some code please
chore: update generator for addLocatorHandler roll (microsoft#1290)