Selenium offers the ability to send an arbitrary y4m video when the webcam is turned on , using the "fake-video-capture" flag as described here for chrome driver: How