After developing a tool to automate visual regression within an E2E test suite, I have encountered a challenge when trying to measure visual regression with autoplaying HTML5 videos. Due to the dynamic nature of videos and the variability in Browserstack's server speed, it is difficult to capture reliable screenshots for comparison purposes. This often results in a significant visual difference of up to 90% during the build process.
One potential solution could involve directing the visual regression tool to a specific URL without videos or in testing mode. However, I am also interested in exploring the possibility of executing JavaScript directly on the active browser session in BrowserStack to control the playback of HTML5 videos and set them to a fixed frame for more accurate visual regression testing.
I am curious if there is a similar function to camme's version of webdriverjs' execute function available in browserstack-webdriver, as this capability would be beneficial for handling different scenarios where specific JavaScript execution is necessary for optimal visual regression testing.