When I write tests to run in playwright, I would like to be able to set the date that the browser believes it to be at the start of the test. Is there a way to achieve this using playwright?
When I write tests to run in playwright, I would like to be able to set the date that the browser believes it to be at the start of the test. Is there a way to achieve this using playwright?
Way easier solution with
You can use mocking tools like TimeShift.
This piece of code would inject the timeshift library and then then the date to
Feb 02 2012
:Output: