I have a web application to test which involves video call, so need to give permissions of mic and camera with options. So that application won't prompt for these permissions again while accessing it.
I have tried the options but either the options are not getting applied to the browser which is being opened or the options which are given are wrong. I have not shared actual website link and credentials, the values are for representational purpose only.
Open Link With Mic And Camera Permissions
${pref_value} create dictionary profile.default_content_setting_values.media_stream_camera ${1} profile.default_content_setting_values.media_stream_mic ${1}
${add_options} create dictionary prefs=${pref_value}
${full_options} create dictionary add_experimental_option=${add_options}
Open Browser https://demosite.com Chrome options=${full_options}
Wait Until Element Is Visible //input[@name='username']
input text //input[@name='username'] username@demosite.com
input text //input[@name='username'] Passw0rd&123
click element //button[@type='submit']
sleep 2
The options which are being formed are as follows:
${full_options} = {'add_experimental_option': {'prefs': {'profile.default_content_setting_values.media_stream_camera': 1, 'profile.default_content_setting_values.media_stream_mic': 1}}}
Expected: The browser should get start with mic and camera permissions and should not prompt on login.
Actual: The browser starts and login is done but here browser asks for mic and camera permissions.