Microphone Access with Selenium

1,131 views
Skip to first unread message

bk...@yahoo.com

unread,
Oct 10, 2013, 10:13:28 AM10/10/13
to seleniu...@googlegroups.com
Hi, I'm trying to use Selenium to drive a website that needs access to the microphone/camera to make a phone call.  I'm currently using Python's Selenium API (http://selenium-python.readthedocs.org/en/latest/api.html) to drive the test, since all the other automation is already written in Python.  The test I'm currently working on is using the Firefox Browser.  I'm able to navigate through the page and make the phone call, but at the point where the call is to be connected, the Firefox browser prompts the user for access to the microphone/camera.  I haven't been able to figure out how to click the 'Share Selected Device' dropdown.  I try and 'Inspect Element' with Firefox by right clicking on the element on the webpage, but that does not work with this Microphone/Camera display.  I've verified it is not an alert and I also tried issuing a send_keys with the appropriate commands to click the button (Tab, Tab, Tab, Space), but this is not working when done with selenium.

Any ideas?  Thanks!

David

unread,
Oct 10, 2013, 2:22:10 PM10/10/13
to seleniu...@googlegroups.com
Do you know how this camera/mic functionality is offered on the site? I'm guessing it is likely a Flash, Silverlight, or Java plugin. There's nothing for HTML5/native web that offers that I believe.

And as such, you likely won't be able to deal with it with Selenium alone, especially if the plugin code for that is not yours (e.g. you can't instrument the plugin to allow API scripting against it).

Your last resort workaround is to combine Selenium with tools like Sikuli and/or AutoIt, which could handle manipulating the plugin. But the caveat to that, is integrating such tools, you can't really deploy in a Selenium Grid or parallel testing fashion w/o knowing specifically which node to execute the test on because Sikuli/AutoIt are not "grid" enabled unlike Selenium.
Reply all
Reply to author
Forward
0 new messages