0

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.

Ghana
  • 63
  • 8
  • this can help you https://stackoverflow.com/questions/53500111/how-to-access-microphonecamera-in-robot-framework ? – Sidara KEO Sep 04 '19 at 04:32
  • The first solution didn't work, the second one has no reference as to what the **last_used=${1470931206}** is! Then I tried replacing the URL **https://www.google.nl:443** to my test website but it didn't work for me. – Ghana Sep 04 '19 at 08:04

0 Answers0