久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='yUzyT'></tfoot>
    <i id='yUzyT'><tr id='yUzyT'><dt id='yUzyT'><q id='yUzyT'><span id='yUzyT'><b id='yUzyT'><form id='yUzyT'><ins id='yUzyT'></ins><ul id='yUzyT'></ul><sub id='yUzyT'></sub></form><legend id='yUzyT'></legend><bdo id='yUzyT'><pre id='yUzyT'><center id='yUzyT'></center></pre></bdo></b><th id='yUzyT'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='yUzyT'><tfoot id='yUzyT'></tfoot><dl id='yUzyT'><fieldset id='yUzyT'></fieldset></dl></div>
  • <small id='yUzyT'></small><noframes id='yUzyT'>

    • <bdo id='yUzyT'></bdo><ul id='yUzyT'></ul>

      <legend id='yUzyT'><style id='yUzyT'><dir id='yUzyT'><q id='yUzyT'></q></dir></style></legend>

        通過 Selenium Chromedriver 自動授予對 Chrome 48 中視頻

        Grant access to video and audio in Chrome 48 via Selenium Chromedriver automatically(通過 Selenium Chromedriver 自動授予對 Chrome 48 中視頻和音頻的訪問權限)
      1. <i id='qomaz'><tr id='qomaz'><dt id='qomaz'><q id='qomaz'><span id='qomaz'><b id='qomaz'><form id='qomaz'><ins id='qomaz'></ins><ul id='qomaz'></ul><sub id='qomaz'></sub></form><legend id='qomaz'></legend><bdo id='qomaz'><pre id='qomaz'><center id='qomaz'></center></pre></bdo></b><th id='qomaz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='qomaz'><tfoot id='qomaz'></tfoot><dl id='qomaz'><fieldset id='qomaz'></fieldset></dl></div>
              <tfoot id='qomaz'></tfoot>

                  <tbody id='qomaz'></tbody>
                  <bdo id='qomaz'></bdo><ul id='qomaz'></ul>

                  <legend id='qomaz'><style id='qomaz'><dir id='qomaz'><q id='qomaz'></q></dir></style></legend>

                  <small id='qomaz'></small><noframes id='qomaz'>

                • 本文介紹了通過 Selenium Chromedriver 自動授予對 Chrome 48 中視頻和音頻的訪問權限的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想通過 Chromedriver 功能自動授予對 Chrome 中視頻和音頻的訪問權限.

                  I would like to automatically grant access to video and audio in Chrome via Chromedriver capabilities.

                  基于 this(相當老的)答案,我嘗試了以下方法:

                  Based on this (pretty old) answer I tried the following:

                  DesiredCapabilities capabilities = DesiredCapabilities.chrome();
                  ChromeOptions options = new ChromeOptions();
                  Map<String, Object> prefs = new HashMap<>();
                  
                  // with this chrome still asks for permission
                  prefs.put("profile.managed_default_content_settings.media_stream", 1);
                  prefs.put("profile.managed_default_content_settings.media_stream_camera", 1);
                  prefs.put("profile.managed_default_content_settings.media_stream_mic", 1);
                  
                  // and this prevents chrome from starting
                  prefs.put("profile.content_settings.exceptions.media_stream_mic.https://*,*.setting", 1);
                  prefs.put("profile.content_settings.exceptions.media_stream_mic.https://*,*.last_used", 1);
                  prefs.put("profile.content_settings.exceptions.media_stream_camera.https://*,*.setting", 1);
                  prefs.put("profile.content_settings.exceptions.media_stream_camera.https://*,*.last_used", 1);
                  
                  // and this prevents chrome from starting as well
                  prefs.put("profile.content_settings.pattern_pairs.https://*,*.media_stream.video", "Allow");
                  prefs.put("profile.content_settings.pattern_pairs.https://*,*.media_stream.audio", "Allow");
                  
                  options.setExperimentalOption("prefs", prefs);
                  capabilities.setCapability(ChromeOptions.CAPABILITY, options);
                  

                  關于如何正確授予權限的任何想法?

                  Any ideas on how to grant permissions correctly?

                  推薦答案

                  遇到了類似的問題,用這個解決了:

                  Faced similar issue, solved with this:

                  ChromeOptions options = new ChromeOptions();
                  options.addArguments("--use-fake-ui-for-media-stream=1");
                  driver = new ChromeDriver(options);
                  

                  您也可以使用此方法更改默認相機:

                  You can also change default camera using this method:

                  Map<String, Object> prefs = new HashMap<String, Object>();
                  prefs.put("media.default_video_capture_Device", "\\?\root#media#0002#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global");
                  options.setExperimentalOption("prefs", prefs);
                  

                  相機代碼可以從設置窗口(使用開發工具檢查)或Chrome目錄中的首選項文件中獲取.

                  Camera code could be obtained from settings window (inspect with dev tools) or from preferences file in Chrome directory.

                  這篇關于通過 Selenium Chromedriver 自動授予對 Chrome 48 中視頻和音頻的訪問權限的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)

                  <small id='tjQWq'></small><noframes id='tjQWq'>

                  • <i id='tjQWq'><tr id='tjQWq'><dt id='tjQWq'><q id='tjQWq'><span id='tjQWq'><b id='tjQWq'><form id='tjQWq'><ins id='tjQWq'></ins><ul id='tjQWq'></ul><sub id='tjQWq'></sub></form><legend id='tjQWq'></legend><bdo id='tjQWq'><pre id='tjQWq'><center id='tjQWq'></center></pre></bdo></b><th id='tjQWq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='tjQWq'><tfoot id='tjQWq'></tfoot><dl id='tjQWq'><fieldset id='tjQWq'></fieldset></dl></div>
                    <tfoot id='tjQWq'></tfoot>

                        <bdo id='tjQWq'></bdo><ul id='tjQWq'></ul>

                            <tbody id='tjQWq'></tbody>

                        1. <legend id='tjQWq'><style id='tjQWq'><dir id='tjQWq'><q id='tjQWq'></q></dir></style></legend>

                            主站蜘蛛池模板: 国产三级精品三级在线观看四季网 | 成人h视频在线 | 国产亚洲精品美女久久久久久久久久 | 亚洲欧美日韩在线 | 三级高清 | 亚洲国产网 | 亚洲色图网址 | 黑人巨大精品 | 中文字幕免费 | 亚洲欧美日韩精品久久亚洲区 | av在线二区 | 成人av免费 | 久久精品免费一区二区 | 欧美黄色绿像 | 日韩一区二区三区在线视频 | 久久99久久99久久 | 久久久久久久国产 | 精品久久久久久久久久久下田 | 国产精品日日摸夜夜添夜夜av | 在线观看视频h | 成人亚洲一区 | 欧美国产精品一区二区三区 | 欧美久久精品一级c片 | 亚洲va中文字幕 | av毛片| 欧美亚洲一区二区三区 | 精品亚洲一区二区三区四区五区 | 亚洲高清视频一区二区 | 国产欧美精品一区 | 新疆少妇videos高潮 | 日韩在线看片 | 国产在线精品一区二区三区 | 91精品麻豆日日躁夜夜躁 | 91av在线免费观看 | 亚洲国产精品视频一区 | 日日天天 | 9porny九色视频自拍 | 日本黄色的视频 | 日韩中文一区 | 久久久做| 久久综合一区 |