Grant Permissions usage in Browser Library


I am trying to automate MS Teams on Chrome web browser using Browser Library in Robot Framework. I am facing issue while automating dial a call from MS Teams. It is asking to grant permissions for Microphone and Camera. I have used “Grant permission” keyword as below.
Grant Permissions Microsoft Teams microphone

I am getting below error:ValueError: Argument ‘permissions’ got value ‘Microsoft Teams’ that cannot be converted to Permission: Permission does not have memberAvailable: ‘accelerometer’, ‘accessibility_events’, ‘ambient_light_sensor’, ‘background_sync’, ‘camera’, ‘clipboard_read’, ‘clipboard_write’, ‘geolocation’, ‘gyroscope’, ‘magnetometer’, ‘microphone’, ‘midi’, ‘midi_sysex’, ‘notifications’, ‘payment_handler’ and ‘push’

Can any one help here or suggest me how to use Grant permission keyword in the Script.
Thank you so much in advance.

Hi Kranti,

Grant Permissions takes 2 arguments, is a list of permissions to grant, and optionally the origin site to grant permissions to.

 	 Grant Permissions 	 Microsoft Teams 	microphone

Given Microsoft Teams is neither a permission nor a url, it’s not surprising you got an error.

you could try this

 	 Grant Permissions  	microphone


 	 Grant Permissions  	microphone  	https://your.teams.server/path/to/teams


Thank you so much it is working now.

1 Like