I'm building a screen sharing app.
How do I accept the browser pop up from navigator.mediaDevices.getDisplayMedia
with rspec
and capybara
?
I've attempted page.driver.browser.switch_to.alert.accept
and page.driver.browser.accept_js_confirms
You can’t. It’s not a pop up that’s defined in the webdriver spec so there’s no way currently to interact with it. Instead you may be able to use Chromes WebRTC testing command line arguments to automatically skip the prompt and provide a fake media stream - https://webrtc.org/getting-started/testing