Bug 213641

Summary: Enable mock capture devices from WebDriver capabilities.
Product: WebKit Reporter: jy
Component: WebDriverAssignee: Nobody <webkit-unassigned>
Status: RESOLVED MOVED    
Severity: Normal CC: bburg
Priority: P2    
Version: Safari 13   
Hardware: Mac   
OS: macOS 10.15   

Description jy 2020-06-25 22:17:28 PDT
Currently it is not possible to enable WebRTC's mock capture devices through the newly introduced (with Safari 13) safaridriver. 

This prevents this setting from being enabled as part of automation test suites.

This is crucial especially for running automated tests on simulator where there is no real media devices.
Comment 1 BJ Burg 2020-06-26 08:15:56 PDT
(In reply to jy from comment #0)
> Currently it is not possible to enable WebRTC's mock capture devices through
> the newly introduced (with Safari 13) safaridriver. 
> 
> This prevents this setting from being enabled as part of automation test
> suites.
> 
> This is crucial especially for running automated tests on simulator where
> there is no real media devices.

I'm not sure how you got that impression. All tabs created during a WebDriver session will automatically use mock capture devices. If they aren't, then it is a bug. 

safaridriver has been included with Safari since Safari 10. And extended capabilities to control WebRTC (see `man safaridriver`) have been around since Safari 12.1.

If this reproduces for you within a standalone test case, please file an issue at https://feedbackassistant.apple.com/ as the fix may not necessarily be in WebKit code. Please include a sysdiagnose, a test case, and full version information for the macOS host and the iOS simulator.

Thanks, BJ