Jul 16, 2016

How can I allow the microphone/camera permission automatically using selenium webdriver?

I m automating an app in which chrome and firefox browsers ask for permission to allow camera and microphone access. I could not get their "id" or "xpaths" . How can i auto allow these permissions
I saw a thread online that states that at least for Firefox you'll need to specify the profile and then set the media.navigator.permission.disabled to true.
There are a couple of different option for Chrome. Take a look at the links for the Selenium/Python code suggestions for both browsers. Hope those work.
FIrefox: http://stackoverflow.com/questions/21310797/using-selenium-webdriver-and-python-how-do-i-suppress-the-prompt-to-share-my-ca
Chrome: http://stackoverflow.com/questions/21628904/accept-permission-request-in-chrome-using-selenium
Answer this