Skip to content

Don't fake event timestamps when clicking elements

Previously the driver was sending an integer unix timestamp, which mirrors old Chrome behaviour. However since Chrome 49 the event timestamp is a high resolution time relative to the page navigation. If an integer is passed over devtools protocol, Chrome will attempt to convert it to the new epoch / type. But this will usually introduce rounding errors, which often means the event timestamp is reported as being 500ms or more before the time it was actually fired.

This then causes issues with front-end code (including vuejs) that uses the event timestamp to detect various edge cases in event dispatch with dynamic content. In particular if the event appears to originate from before an element was rendered / listener was attached, it may be ignored producing hard-to-debug errors that cannot be replicated in a real browser.

Merge request reports