I've built a tool to automate visual regression as part of an E2E test suite and while it works fine under most situations I have encountered a problem trying to measure visual regression with auto playing HTML5 videos.
As a video is a moving target for the screenshots and the Browserstack session is always reliant on Browserstack's server speed there is rarely going to be a situation where the screenshots taken after the screen has loaded will be a close enough to serve as a reliable source for a visual regression test. In a build process most of the time there will be a 90% visual difference.
One solution would be to point my visual regression tool at a ?video=off or a ?test=true url but I would also like to explore executing javascript on the active browser session in BrowserStack to use the HTML5 video to stop and set the frame of the video to a fixed point to act as a more reliable source of visual regression.
Is there anything similar to the execute function of camme's version of webdriverjs inside the browserstack-webdriver as this feels like there could be a few scenarios where specific JS might need to execute to make the most out of visual regression testing.